summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-06-24 13:46:46 +0000
committerBart Polot <bart@net.in.tum.de>2015-06-24 13:46:46 +0000
commit10578e5356f899b449aded000f02349d68a9d39e (patch)
treebc8cd5932b4cf77b936b3df8689b0c10dcf22cc2 /src
parent4e98c296bedebd7f857b1db31b0d5b3d651d4f10 (diff)
- always free connection path, fix memory leak
Diffstat (limited to 'src')
-rw-r--r--src/cadet/gnunet-service-cadet_connection.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c
index 917eed307..df5693d3a 100644
--- a/src/cadet/gnunet-service-cadet_connection.c
+++ b/src/cadet/gnunet-service-cadet_connection.c
@@ -2800,6 +2800,8 @@ GCC_destroy (struct CadetConnection *c)
{
connection_cancel_queues (c, GNUNET_YES);
connection_cancel_queues (c, GNUNET_NO);
+ path_destroy (c->path);
+ c->path = NULL;
}
unregister_neighbors (c);
@@ -2821,9 +2823,6 @@ GCC_destroy (struct CadetConnection *c)
if (NULL != c->t)
GCT_remove_connection (c->t, c);
- if ( (GNUNET_NO == GCC_is_origin (c, GNUNET_YES)) &&
- (NULL != c->path) )
- path_destroy (c->path);
if (NULL != c->fwd_maintenance_task)
GNUNET_SCHEDULER_cancel (c->fwd_maintenance_task);
if (NULL != c->bck_maintenance_task)