diff options
Diffstat (limited to 'src/cadet/gnunet-service-cadet_peer.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet_peer.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c index e19c3ca48..fa338f13f 100644 --- a/src/cadet/gnunet-service-cadet_peer.c +++ b/src/cadet/gnunet-service-cadet_peer.c | |||
@@ -787,7 +787,12 @@ peer_destroy (struct CadetPeer *peer) | |||
787 | GNUNET_ATS_connectivity_suggest_cancel (peer->connectivity_suggestion); | 787 | GNUNET_ATS_connectivity_suggest_cancel (peer->connectivity_suggestion); |
788 | peer->connectivity_suggestion = NULL; | 788 | peer->connectivity_suggestion = NULL; |
789 | } | 789 | } |
790 | while (NULL != peer->queue_head) | 790 | /* Following check was 'while' instead of 'if', but GCP_queue_destroy |
791 | * frees 'peer->queue_head' so the while checks on freed memory. | ||
792 | * Not sure if 'if' is what you wanted, but 'while' can't be | ||
793 | * correct. --lynX | ||
794 | */ | ||
795 | if (NULL != peer->queue_head) | ||
791 | { | 796 | { |
792 | GCP_queue_destroy (peer->queue_head, GNUNET_YES, GNUNET_NO, 0); | 797 | GCP_queue_destroy (peer->queue_head, GNUNET_YES, GNUNET_NO, 0); |
793 | } | 798 | } |