diff options
author | Tim Rühsen <tim.ruehsen@gmx.de> | 2019-04-14 18:13:06 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-04-14 19:08:07 +0200 |
commit | 3b57d62c2102adac4efe45bd55d0026a9ca66b18 (patch) | |
tree | 7de18b0d38663b8a56f471dbf7efaa993a641951 /src/examples/http_chunked_compression.c | |
parent | 1f1f8a50be968416b735d0a05242259396762644 (diff) | |
download | libmicrohttpd-3b57d62c2102adac4efe45bd55d0026a9ca66b18.tar.gz libmicrohttpd-3b57d62c2102adac4efe45bd55d0026a9ca66b18.zip |
Fix memleak in example
Diffstat (limited to 'src/examples/http_chunked_compression.c')
-rw-r--r-- | src/examples/http_chunked_compression.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/examples/http_chunked_compression.c b/src/examples/http_chunked_compression.c index 167771fa..36b3e1fd 100644 --- a/src/examples/http_chunked_compression.c +++ b/src/examples/http_chunked_compression.c | |||
@@ -101,8 +101,8 @@ read_cb (void *cls, uint64_t pos, char *mem, size_t size) | |||
101 | else | 101 | else |
102 | { | 102 | { |
103 | memcpy (mem, buf, size); | 103 | memcpy (mem, buf, size); |
104 | free (buf); | ||
105 | } | 104 | } |
105 | free (buf); // buf may be set even on error return | ||
106 | done: | 106 | done: |
107 | free (src); | 107 | free (src); |
108 | return size; | 108 | return size; |