From a975c050f211d2ebe70eb78915fb30e0211ece64 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 2 Jul 2016 20:12:52 +0000 Subject: -fix use after free on shutdown --- src/namestore/namestore_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/namestore/namestore_api.c') diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index f5b9d941b..afb7265d8 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c @@ -824,7 +824,7 @@ force_reconnect (struct GNUNET_NAMESTORE_Handle *h) GNUNET_MQ_destroy (h->mq); h->mq = NULL; - for (ze = h->z_head; NULL != ze; ze = ze->next) + while (NULL != (ze = h->z_head)) { /* FIXME: This does not allow clients to distinguish iteration error from successful termination! */ @@ -832,7 +832,7 @@ force_reconnect (struct GNUNET_NAMESTORE_Handle *h) ze->proc (ze->proc_cls, NULL, NULL, 0, NULL); free_ze (ze); } - for (qe = h->op_head; NULL != qe; qe = qe->next) + while (NULL != (qe = h->op_head)) { /* FIXME: This does not allow clients to distinguish iteration error from successful termination! */ -- cgit v1.2.3