gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated: querystring_example: free memory


From: gnunet
Subject: [libmicrohttpd] branch master updated: querystring_example: free memory with new error check
Date: Wed, 25 Aug 2021 19:37:36 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new 46c0d3f4 querystring_example: free memory with new error check
46c0d3f4 is described below

commit 46c0d3f4704b138ca279881c8cb222feb77989c6
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Aug 25 20:33:51 2021 +0300

    querystring_example: free memory with new error check
---
 src/examples/querystring_example.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/examples/querystring_example.c 
b/src/examples/querystring_example.c
index b6d18d49..975d17f2 100644
--- a/src/examples/querystring_example.c
+++ b/src/examples/querystring_example.c
@@ -70,7 +70,10 @@ ahc_echo (void *cls,
   if (me == NULL)
     return MHD_NO;  /* Error allocating memory */
   if (resp_len != snprintf (me, resp_len + 1, fmt, "q", val))
+  {
+    free (me);
     return MHD_NO;  /* Error forming the response body */
+  }
   response = MHD_create_response_from_buffer (resp_len, me,
                                               MHD_RESPMEM_MUST_FREE);
   if (response == NULL)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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