diff options
author | Bart Polot <bart@net.in.tum.de> | 2015-06-24 13:56:33 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2015-06-24 13:56:33 +0000 |
commit | 26a9ded44c5d15c57594db08ecea857af7fb684d (patch) | |
tree | 201739d4cba426d1ec3e12e5019427f5be14588d /src | |
parent | 10578e5356f899b449aded000f02349d68a9d39e (diff) | |
download | gnunet-26a9ded44c5d15c57594db08ecea857af7fb684d.tar.gz gnunet-26a9ded44c5d15c57594db08ecea857af7fb684d.zip |
- free path after unregister
Diffstat (limited to 'src')
-rw-r--r-- | src/cadet/gnunet-service-cadet_connection.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c index df5693d3a..fdceddc70 100644 --- a/src/cadet/gnunet-service-cadet_connection.c +++ b/src/cadet/gnunet-service-cadet_connection.c | |||
@@ -223,7 +223,10 @@ struct CadetConnection | |||
223 | unsigned int pending_messages; | 223 | unsigned int pending_messages; |
224 | 224 | ||
225 | /** | 225 | /** |
226 | * Destroy flag: if true, destroy on last message. | 226 | * Destroy flag: |
227 | * - if 0, connection in use. | ||
228 | * - if 1, destroy on last message. | ||
229 | * - if 2, connection is being destroyed don't re-enter. | ||
227 | */ | 230 | */ |
228 | int destroy; | 231 | int destroy; |
229 | 232 | ||
@@ -2800,10 +2803,10 @@ GCC_destroy (struct CadetConnection *c) | |||
2800 | { | 2803 | { |
2801 | connection_cancel_queues (c, GNUNET_YES); | 2804 | connection_cancel_queues (c, GNUNET_YES); |
2802 | connection_cancel_queues (c, GNUNET_NO); | 2805 | connection_cancel_queues (c, GNUNET_NO); |
2803 | path_destroy (c->path); | ||
2804 | c->path = NULL; | ||
2805 | } | 2806 | } |
2806 | unregister_neighbors (c); | 2807 | unregister_neighbors (c); |
2808 | path_destroy (c->path); | ||
2809 | c->path = NULL; | ||
2807 | 2810 | ||
2808 | /* Cancel maintainance task (keepalive/timeout) */ | 2811 | /* Cancel maintainance task (keepalive/timeout) */ |
2809 | if (NULL != c->fwd_fc.poll_msg) | 2812 | if (NULL != c->fwd_fc.poll_msg) |