From: Przemyslaw Skibinski Date: Tue, 21 Feb 2017 19:10:21 +0000 (+0100) Subject: legacy.c: fix memory leaks X-Git-Tag: v1.1.4~1^2~52^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=346ce32adeb57c468d40f7c4e8ed75c0c84a4f4e;p=thirdparty%2Fzstd.git legacy.c: fix memory leaks --- diff --git a/contrib/pzstd/Makefile b/contrib/pzstd/Makefile index 21ef935c6..cec6959e6 100644 --- a/contrib/pzstd/Makefile +++ b/contrib/pzstd/Makefile @@ -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 diff --git a/tests/legacy.c b/tests/legacy.c index 5d93c68fa..e84e31273 100644 --- a/tests/legacy.c +++ b/tests/legacy.c @@ -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; }