aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-12-15 07:17:45 +0000
committerBart Polot <bart@net.in.tum.de>2014-12-15 07:17:45 +0000
commit2818cc5fd7709735ae4e04263b2dcbdad1b6522f (patch)
treea7a231c5407c819c64d0387bcbbaadc26374fca9 /src
parent198081994598b19d77377fb73ea22747dfa3349a (diff)
downloadgnunet-2818cc5fd7709735ae4e04263b2dcbdad1b6522f.tar.gz
gnunet-2818cc5fd7709735ae4e04263b2dcbdad1b6522f.zip
Fix resending of connection traffic
* avoid SEGFAULT on connections with no tunnel * don't leak memory
Diffstat (limited to 'src')
-rw-r--r--src/cadet/gnunet-service-cadet_connection.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c
index 758984363..9f9955917 100644
--- a/src/cadet/gnunet-service-cadet_connection.c
+++ b/src/cadet/gnunet-service-cadet_connection.c
@@ -1279,7 +1279,11 @@ resend_messages_and_destroy (struct CadetConnection *c, int fwd)
1279 neighbor = get_hop (c, fwd); 1279 neighbor = get_hop (c, fwd);
1280 1280
1281 while (NULL != (out_msg = GCP_connection_pop (neighbor, c, &destroyed))) 1281 while (NULL != (out_msg = GCP_connection_pop (neighbor, c, &destroyed)))
1282 GCT_resend_message (out_msg, t); 1282 {
1283 if (NULL != t)
1284 GCT_resend_message (out_msg, t);
1285 GNUNET_free (out_msg);
1286 }
1283 1287
1284 /* All pending messages should have been popped, 1288 /* All pending messages should have been popped,
1285 * and the connection destroyed by the continuation. 1289 * and the connection destroyed by the continuation.