From 8e125c6490ec13ce6b579d0b078d36b1c155ab82 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Thu, 15 Mar 2012 18:22:00 +0000 Subject: [PATCH] fix segfault --- src/namestore/gnunet-service-namestore.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index bfdae2603..dcf1075b6 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c @@ -304,13 +304,14 @@ client_disconnect_notification (void *cls, struct GNUNET_SERVER_Client *client) if ((NULL == client) || (NULL == nc)) return; - for (no = nc->op_head; no != NULL; no = no->next) + no = nc->op_head; + while (NULL != no) { GNUNET_CONTAINER_DLL_remove (nc->op_head, nc->op_tail, no); GNUNET_free (no); + no = nc->op_head; } - GNUNET_SERVER_client_drop(nc->client); GNUNET_CONTAINER_DLL_remove (client_head, client_tail, nc); GNUNET_free (nc); -- 2.25.1