]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed : memory leak in fuzzer test
authorYann Collet <cyan@fb.com>
Fri, 14 Apr 2017 05:46:41 +0000 (22:46 -0700)
committerYann Collet <cyan@fb.com>
Fri, 14 Apr 2017 05:46:51 +0000 (22:46 -0700)
tests/fuzzer.c

index cdbbe8a22208818cb042285996d79d6f7a0ed9f2..ee051be3e3f080c449999ef389be341dda4e060f 100644 (file)
@@ -549,7 +549,9 @@ static int basicUnitTests(U32 seed, double compressibility)
             if (!ZSTD_isError(result)) goto _output_error;
             if (ZSTD_getErrorCode(result) != ZSTD_error_srcSize_wrong) goto _output_error;
             DISPLAYLEVEL(4, "OK : %s \n", ZSTD_getErrorName(result));
-    }   }
+        }
+        ZSTD_freeCCtx(cctx);
+    }
 
     /* block API tests */
     {   ZSTD_CCtx* const cctx = ZSTD_createCCtx();