aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_peer.c
diff options
context:
space:
mode:
authorCarlo von lynX <lynX@time.to.get.psyced.org>2016-07-29 21:17:38 +0000
committerCarlo von lynX <lynX@time.to.get.psyced.org>2016-07-29 21:17:38 +0000
commita0d960700a3dca5bf07f0cc1dc13a1801c4a7c3b (patch)
treee5fac41b78c1affacf389469c9934814cbfab59f /src/cadet/gnunet-service-cadet_peer.c
parent0cd2efeadb67206c0b3e8f1ba743ff342b18926b (diff)
downloadgnunet-a0d960700a3dca5bf07f0cc1dc13a1801c4a7c3b.tar.gz
gnunet-a0d960700a3dca5bf07f0cc1dc13a1801c4a7c3b.zip
cadet: rollback + warning message for posterity
Diffstat (limited to 'src/cadet/gnunet-service-cadet_peer.c')
-rw-r--r--src/cadet/gnunet-service-cadet_peer.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c
index fa338f13f..f9117953d 100644
--- a/src/cadet/gnunet-service-cadet_peer.c
+++ b/src/cadet/gnunet-service-cadet_peer.c
@@ -787,13 +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 /* Following check was 'while' instead of 'if', but GCP_queue_destroy 790 while (NULL != peer->queue_head)
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)
796 { 791 {
792 /* This function destroys the current peer->queue_head but
793 * replaces it with the next in the queue, so it is correct
794 * to while() here.
795 */
797 GCP_queue_destroy (peer->queue_head, GNUNET_YES, GNUNET_NO, 0); 796 GCP_queue_destroy (peer->queue_head, GNUNET_YES, GNUNET_NO, 0);
798 } 797 }
799 if (NULL != peer->core_transmit) 798 if (NULL != peer->core_transmit)