gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libmicrohttpd] 01/02: Fix memleak in example


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 01/02: Fix memleak in example
Date: Sun, 14 Apr 2019 19:08:15 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository libmicrohttpd.

commit 3b57d62c2102adac4efe45bd55d0026a9ca66b18
Author: Tim Rühsen <address@hidden>
AuthorDate: Sun Apr 14 18:13:06 2019 +0200

    Fix memleak in example
---
 src/examples/http_chunked_compression.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
   else
     {
       memcpy (mem, buf, size);
-      free (buf);
     }
+  free (buf); // buf may be set even on error return
 done:
   free (src);
   return size;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]