gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r31905 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r31905 - gnunet/src/transport
Date: Tue, 14 Jan 2014 16:21:04 +0100

Author: wachs
Date: 2014-01-14 16:21:04 +0100 (Tue, 14 Jan 2014)
New Revision: 31905

Modified:
   gnunet/src/transport/plugin_transport_http_server.c
   gnunet/src/transport/plugin_transport_wlan.c
Log:
fixing memory leaks


Modified: gnunet/src/transport/plugin_transport_http_server.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_server.c 2014-01-14 14:15:06 UTC 
(rev 31904)
+++ gnunet/src/transport/plugin_transport_http_server.c 2014-01-14 15:21:04 UTC 
(rev 31905)
@@ -1144,6 +1144,7 @@
   else
   {
     /* create new session */
+    addr = NULL;
     switch (conn_info->client_addr->sa_family)
     {
     case (AF_INET):
@@ -1185,6 +1186,7 @@
                      http_common_plugin_address_to_string (NULL,
                                                            plugin->protocol,
                                                            addr, addr_len));
+    GNUNET_free_non_null (addr);
   }
   sc = GNUNET_new (struct ServerConnection);
   if (conn_info->client_addr->sa_family == AF_INET)

Modified: gnunet/src/transport/plugin_transport_wlan.c
===================================================================
--- gnunet/src/transport/plugin_transport_wlan.c        2014-01-14 14:15:06 UTC 
(rev 31904)
+++ gnunet/src/transport/plugin_transport_wlan.c        2014-01-14 15:21:04 UTC 
(rev 31905)
@@ -1037,6 +1037,7 @@
     GNUNET_SCHEDULER_cancel (endpoint->timeout_task);
     endpoint->timeout_task = GNUNET_SCHEDULER_NO_TASK;
   }
+  GNUNET_HELLO_address_free (endpoint->address);
   GNUNET_free (endpoint);
 }
 
@@ -1556,7 +1557,9 @@
         mac_to_string (&rxinfo->frame.addr2));
     wa.mac = rxinfo->frame.addr2;
     wa.options = htonl (0);
-    address = GNUNET_HELLO_address_allocate (NULL, PLUGIN_NAME, &wa,
+    struct GNUNET_PeerIdentity dummy;
+    memset (&dummy, '\0', sizeof (dummy));
+    address = GNUNET_HELLO_address_allocate (&dummy, PLUGIN_NAME, &wa,
         sizeof (struct WlanAddress), GNUNET_HELLO_ADDRESS_INFO_NONE);
     mas.endpoint = create_macendpoint (plugin, address);
     GNUNET_HELLO_address_free (address);




reply via email to

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