gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r6066 - in libmicrohttpd: . src/daemon


From: gnunet
Subject: [GNUnet-SVN] r6066 - in libmicrohttpd: . src/daemon
Date: Sun, 30 Dec 2007 13:08:22 -0700 (MST)

Author: grothoff
Date: 2007-12-30 13:08:22 -0700 (Sun, 30 Dec 2007)
New Revision: 6066

Modified:
   libmicrohttpd/AUTHORS
   libmicrohttpd/src/daemon/daemon.c
   libmicrohttpd/src/daemon/minimal_example.c
   libmicrohttpd/src/daemon/response.c
Log:
docs and bugfixes

Modified: libmicrohttpd/AUTHORS
===================================================================
--- libmicrohttpd/AUTHORS       2007-12-30 20:07:39 UTC (rev 6065)
+++ libmicrohttpd/AUTHORS       2007-12-30 20:08:22 UTC (rev 6066)
@@ -7,3 +7,6 @@
 Daniel Pittman <address@hidden>
 Nils Durner <address@hidden>
 Heikki Lindholm <address@hidden>
+
+Documentation contributions also came from:
+Marco Maggi <address@hidden>

Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c   2007-12-30 20:07:39 UTC (rev 6065)
+++ libmicrohttpd/src/daemon/daemon.c   2007-12-30 20:08:22 UTC (rev 6066)
@@ -596,6 +596,11 @@
       return NULL;
     }
   retVal = malloc (sizeof (struct MHD_Daemon));
+  if (retVal == NULL)
+    {
+      CLOSE(socket_fd);
+      return NULL;
+    }
   memset (retVal, 0, sizeof (struct MHD_Daemon));
   retVal->options = options;
   retVal->port = port;

Modified: libmicrohttpd/src/daemon/minimal_example.c
===================================================================
--- libmicrohttpd/src/daemon/minimal_example.c  2007-12-30 20:07:39 UTC (rev 
6065)
+++ libmicrohttpd/src/daemon/minimal_example.c  2007-12-30 20:08:22 UTC (rev 
6066)
@@ -40,8 +40,9 @@
           struct MHD_Connection *connection,
           const char *url,
           const char *method,
+         const char *version,
           const char *upload_data,
-          const char *version, unsigned int *upload_data_size, void **ptr)
+         unsigned int *upload_data_size, void **ptr)
 {
   static int aptr;
   const char *me = cls;

Modified: libmicrohttpd/src/daemon/response.c
===================================================================
--- libmicrohttpd/src/daemon/response.c 2007-12-30 20:07:39 UTC (rev 6065)
+++ libmicrohttpd/src/daemon/response.c 2007-12-30 20:08:22 UTC (rev 6066)
@@ -226,6 +226,8 @@
   if ((data == NULL) && (size > 0))
     return NULL;
   retVal = malloc (sizeof (struct MHD_Response));
+  if (retVal == NULL)
+    return NULL;
   memset (retVal, 0, sizeof (struct MHD_Response));
   if (pthread_mutex_init (&retVal->mutex, NULL) != 0)
     {
@@ -235,6 +237,11 @@
   if ((must_copy) && (size > 0))
     {
       tmp = malloc (size);
+      if (tmp == NULL)
+       {
+         free(retVal);
+         return NULL;
+       }
       memcpy (tmp, data, size);
       must_free = 1;
       data = tmp;





reply via email to

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