aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-01-14 15:21:04 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-01-14 15:21:04 +0000
commit56e49b44a00454606f055cfdb362d976547bf64d (patch)
tree1d924665aa92d5ce1ea6cfa6350c761a81b9a969 /src
parent3d20da8230a5383c2389cb274856560412598119 (diff)
downloadgnunet-56e49b44a00454606f055cfdb362d976547bf64d.tar.gz
gnunet-56e49b44a00454606f055cfdb362d976547bf64d.zip
fixing memory leaks
Diffstat (limited to 'src')
-rw-r--r--src/transport/plugin_transport_http_server.c2
-rw-r--r--src/transport/plugin_transport_wlan.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index bdc1074ed..53ee27005 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -1144,6 +1144,7 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin,
1144 else 1144 else
1145 { 1145 {
1146 /* create new session */ 1146 /* create new session */
1147 addr = NULL;
1147 switch (conn_info->client_addr->sa_family) 1148 switch (conn_info->client_addr->sa_family)
1148 { 1149 {
1149 case (AF_INET): 1150 case (AF_INET):
@@ -1185,6 +1186,7 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin,
1185 http_common_plugin_address_to_string (NULL, 1186 http_common_plugin_address_to_string (NULL,
1186 plugin->protocol, 1187 plugin->protocol,
1187 addr, addr_len)); 1188 addr, addr_len));
1189 GNUNET_free_non_null (addr);
1188 } 1190 }
1189 sc = GNUNET_new (struct ServerConnection); 1191 sc = GNUNET_new (struct ServerConnection);
1190 if (conn_info->client_addr->sa_family == AF_INET) 1192 if (conn_info->client_addr->sa_family == AF_INET)
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index 1026eb584..103d21ae1 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -1037,6 +1037,7 @@ free_macendpoint (struct MacEndpoint *endpoint)
1037 GNUNET_SCHEDULER_cancel (endpoint->timeout_task); 1037 GNUNET_SCHEDULER_cancel (endpoint->timeout_task);
1038 endpoint->timeout_task = GNUNET_SCHEDULER_NO_TASK; 1038 endpoint->timeout_task = GNUNET_SCHEDULER_NO_TASK;
1039 } 1039 }
1040 GNUNET_HELLO_address_free (endpoint->address);
1040 GNUNET_free (endpoint); 1041 GNUNET_free (endpoint);
1041} 1042}
1042 1043
@@ -1556,7 +1557,9 @@ handle_helper_message (void *cls, void *client,
1556 mac_to_string (&rxinfo->frame.addr2)); 1557 mac_to_string (&rxinfo->frame.addr2));
1557 wa.mac = rxinfo->frame.addr2; 1558 wa.mac = rxinfo->frame.addr2;
1558 wa.options = htonl (0); 1559 wa.options = htonl (0);
1559 address = GNUNET_HELLO_address_allocate (NULL, PLUGIN_NAME, &wa, 1560 struct GNUNET_PeerIdentity dummy;
1561 memset (&dummy, '\0', sizeof (dummy));
1562 address = GNUNET_HELLO_address_allocate (&dummy, PLUGIN_NAME, &wa,
1560 sizeof (struct WlanAddress), GNUNET_HELLO_ADDRESS_INFO_NONE); 1563 sizeof (struct WlanAddress), GNUNET_HELLO_ADDRESS_INFO_NONE);
1561 mas.endpoint = create_macendpoint (plugin, address); 1564 mas.endpoint = create_macendpoint (plugin, address);
1562 GNUNET_HELLO_address_free (address); 1565 GNUNET_HELLO_address_free (address);