Fix wrong conditional in free() functions
diff --git a/library/chachapoly.c b/library/chachapoly.c
index e6ea139..dc643dd 100644
--- a/library/chachapoly.c
+++ b/library/chachapoly.c
@@ -108,7 +108,7 @@
 
 void mbedtls_chachapoly_free( mbedtls_chachapoly_context *ctx )
 {
-    if( ctx != NULL )
+    if( ctx == NULL )
         return;
 
     mbedtls_chacha20_free( &ctx->chacha20_ctx );