diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-04-07 09:20:31 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-04-07 09:20:31 +0000 |
commit | df0a5da00aeb71ec3e6eb5937e800f2e6fd269ee (patch) | |
tree | 7198afaa9b34dc00009c03fce67b4fd480de9d8c /src/transport/plugin_transport_udp.c | |
parent | a740974b42420e5619052d6a13bc3146ddb5a376 (diff) | |
download | gnunet-df0a5da00aeb71ec3e6eb5937e800f2e6fd269ee.tar.gz gnunet-df0a5da00aeb71ec3e6eb5937e800f2e6fd269ee.zip |
fixng crash on shutdown
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index bb3af28dd..d1cfbc620 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -1265,14 +1265,17 @@ udp_disconnect_session (void *cls, struct Session *s) | |||
1265 | frc.addr = s->address->address; | 1265 | frc.addr = s->address->address; |
1266 | frc.addr_len = s->address->address_length; | 1266 | frc.addr_len = s->address->address_length; |
1267 | /* Lookup existing receive context for this address */ | 1267 | /* Lookup existing receive context for this address */ |
1268 | GNUNET_CONTAINER_heap_iterate (plugin->defrag_ctxs, | 1268 | if (NULL != plugin->defrag_ctxs) |
1269 | &find_receive_context, &frc); | ||
1270 | if (NULL != frc.rc) | ||
1271 | { | 1269 | { |
1272 | struct DefragContext *d_ctx = frc.rc; | 1270 | GNUNET_CONTAINER_heap_iterate (plugin->defrag_ctxs, |
1273 | GNUNET_CONTAINER_heap_remove_node (d_ctx->hnode); | 1271 | &find_receive_context, &frc); |
1274 | GNUNET_DEFRAGMENT_context_destroy (d_ctx->defrag); | 1272 | if (NULL != frc.rc) |
1275 | GNUNET_free (d_ctx); | 1273 | { |
1274 | struct DefragContext *d_ctx = frc.rc; | ||
1275 | GNUNET_CONTAINER_heap_remove_node (d_ctx->hnode); | ||
1276 | GNUNET_DEFRAGMENT_context_destroy (d_ctx->defrag); | ||
1277 | GNUNET_free (d_ctx); | ||
1278 | } | ||
1276 | } | 1279 | } |
1277 | 1280 | ||
1278 | next = plugin->ipv4_queue_head; | 1281 | next = plugin->ipv4_queue_head; |