diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-14 15:21:04 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-01-14 15:21:04 +0000 |
commit | 56e49b44a00454606f055cfdb362d976547bf64d (patch) | |
tree | 1d924665aa92d5ce1ea6cfa6350c761a81b9a969 /src/transport/plugin_transport_wlan.c | |
parent | 3d20da8230a5383c2389cb274856560412598119 (diff) | |
download | gnunet-56e49b44a00454606f055cfdb362d976547bf64d.tar.gz gnunet-56e49b44a00454606f055cfdb362d976547bf64d.zip |
fixing memory leaks
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r-- | src/transport/plugin_transport_wlan.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |