gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r16830 - in libmicrohttpd: . src/daemon
Date: Wed, 14 Sep 2011 13:44:18 +0200

Author: grothoff
Date: 2011-09-14 13:44:18 +0200 (Wed, 14 Sep 2011)
New Revision: 16830

Modified:
   libmicrohttpd/ChangeLog
   libmicrohttpd/src/daemon/daemon.c
Log:
fixing 1766

Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog     2011-09-14 08:53:52 UTC (rev 16829)
+++ libmicrohttpd/ChangeLog     2011-09-14 11:44:18 UTC (rev 16830)
@@ -1,3 +1,7 @@
+Wed Sep 14 13:43:26 CEST 2011
+       Fixing minor memory leak if daemon with HTTPS support failed to
+       initialize (#1766). -CG
+
 Tue Sep 13 09:47:58 CEST 2011
        Try to release responses more promptly upon connection termination. -CG
 

Modified: libmicrohttpd/src/daemon/daemon.c
===================================================================
--- libmicrohttpd/src/daemon/daemon.c   2011-09-14 08:53:52 UTC (rev 16829)
+++ libmicrohttpd/src/daemon/daemon.c   2011-09-14 11:44:18 UTC (rev 16830)
@@ -2005,6 +2005,10 @@
 
   if (MHD_YES != parse_options_va (retVal, &servaddr, ap))
     {
+#if HTTPS_SUPPORT
+      if (options & MHD_USE_SSL)
+       gnutls_priority_deinit (retVal->priority_cache);
+#endif
       free (retVal);
       return NULL;
     }
@@ -2019,6 +2023,10 @@
          MHD_DLOG (retVal,
                    "Specified value for NC_SIZE too large\n");
 #endif
+#if HTTPS_SUPPORT
+         if (options & MHD_USE_SSL)
+           gnutls_priority_deinit (retVal->priority_cache);
+#endif
          free (retVal);
          return NULL;    
        }
@@ -2030,6 +2038,10 @@
                        "Failed to allocate memory for nonce-nc map: %s\n",
                        STRERROR (errno));
 #endif
+#if HTTPS_SUPPORT
+             if (options & MHD_USE_SSL)
+               gnutls_priority_deinit (retVal->priority_cache);
+#endif
              free (retVal);
              return NULL;
            }
@@ -2041,6 +2053,10 @@
       MHD_DLOG (retVal,
                "MHD failed to initialize nonce-nc mutex\n");
 #endif
+#if HTTPS_SUPPORT
+      if (options & MHD_USE_SSL)
+       gnutls_priority_deinit (retVal->priority_cache);
+#endif
       free (retVal->nnc);
       free (retVal);
       return NULL;
@@ -2362,6 +2378,10 @@
   free (retVal->nnc);
   pthread_mutex_destroy (&retVal->nnc_lock);
 #endif
+#if HTTPS_SUPPORT
+  if (options & MHD_USE_SSL)
+    gnutls_priority_deinit (retVal->priority_cache);
+#endif
   free (retVal);
   return NULL;
 }




reply via email to

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