gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libmicrohttpd] branch master updated (1f1f8a50 -> 3ab54c6b


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] branch master updated (1f1f8a50 -> 3ab54c6b)
Date: Sun, 14 Apr 2019 19:08:14 +0200

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

grothoff pushed a change to branch master
in repository libmicrohttpd.

    from 1f1f8a50 VC builds: fix asserts and release builds
     new 3b57d62c Fix memleak in example
     new 3ab54c6b Narrow scope of variable to succeed scan-build

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/examples/http_chunked_compression.c | 2 +-
 src/microhttpd/connection.c             | 7 +++----
 2 files changed, 4 insertions(+), 5 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)
   else
     {
       memcpy (mem, buf, size);
-      free (buf);
     }
+  free (buf); // buf may be set even on error return
 done:
   free (src);
   return size;
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 4fe66805..8b136b83 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -2272,7 +2272,6 @@ parse_initial_message_line (struct MHD_Connection 
*connection,
   char *http_version;
   char *args;
   unsigned int unused_num_headers;
-  size_t uri_len;
 
   if (NULL == (uri = memchr (line,
                              ' ',
@@ -2290,13 +2289,13 @@ parse_initial_message_line (struct MHD_Connection 
*connection,
     {
       /* No URI and no http version given */
       curi = "";
-      uri_len = 0;
       uri = NULL;
       connection->version = "";
       args = NULL;
     }
   else
     {
+      size_t uri_len;
       curi = uri;
       /* Search from back to accept misformed URI with space */
       http_version = line + line_len - 1;
@@ -2344,7 +2343,7 @@ parse_initial_message_line (struct MHD_Connection 
*connection,
                                    uri,
                                     connection);
     }
-  
+
   if (NULL != args)
     {
       args[0] = '\0';
@@ -2356,7 +2355,7 @@ parse_initial_message_line (struct MHD_Connection 
*connection,
                            &connection_add_header,
                            &unused_num_headers);
     }
-  
+
   /* unescape URI *after* searching for arguments and log callback */
   if (NULL != uri)
     daemon->unescape_callback (daemon->unescape_callback_cls,

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



reply via email to

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