]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
legacy.c: fix memory leaks
authorPrzemyslaw Skibinski <inikep@gmail.com>
Tue, 21 Feb 2017 19:10:21 +0000 (20:10 +0100)
committerPrzemyslaw Skibinski <inikep@gmail.com>
Tue, 21 Feb 2017 19:10:21 +0000 (20:10 +0100)
contrib/pzstd/Makefile
tests/legacy.c

index 21ef935c600447a514a1d2ea5a81a3223adc881d..cec6959e62a58d6ab339928c2821ececed6ce038 100644 (file)
@@ -134,7 +134,7 @@ debug: pzstd$(EXT) tests roundtrip
 
 .PHONY: tsan
 tsan: PZSTD_CCXXFLAGS += -fsanitize=thread -fPIC
-tsan: PZSTD_LDFLAGS   += -fsanitize=thread -pie
+tsan: PZSTD_LDFLAGS   += -fsanitize=thread
 tsan: debug
 
 .PHONY: asan
index 5d93c68faba11ec4abc09d6d6566ed6058419d37..e84e31273734ac6b40c5dfa669202f056897d594 100644 (file)
@@ -65,6 +65,7 @@ int testSimpleAPI(void)
         return 1;
     }
 
+    free(output);
     DISPLAY("Simple API OK\n");
     return 0;
 }
@@ -118,6 +119,8 @@ int testStreamingAPI(void)
         }
     }
 
+    free(outBuff);
+    ZSTD_freeDStream(stream);
     DISPLAY("Streaming API OK\n");
     return 0;
 }