aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-03-15 18:22:00 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-03-15 18:22:00 +0000
commit8e125c6490ec13ce6b579d0b078d36b1c155ab82 (patch)
tree831b1558cc714532d598664b78288df06c6707db
parentae6d94e4a50e5dbd4d3a698e8a3cc10f62e9e0b9 (diff)
downloadgnunet-8e125c6490ec13ce6b579d0b078d36b1c155ab82.tar.gz
gnunet-8e125c6490ec13ce6b579d0b078d36b1c155ab82.zip
fix segfault
-rw-r--r--src/namestore/gnunet-service-namestore.c5
1 files 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)
304 if ((NULL == client) || (NULL == nc)) 304 if ((NULL == client) || (NULL == nc))
305 return; 305 return;
306 306
307 for (no = nc->op_head; no != NULL; no = no->next) 307 no = nc->op_head;
308 while (NULL != no)
308 { 309 {
309 GNUNET_CONTAINER_DLL_remove (nc->op_head, nc->op_tail, no); 310 GNUNET_CONTAINER_DLL_remove (nc->op_head, nc->op_tail, no);
310 GNUNET_free (no); 311 GNUNET_free (no);
312 no = nc->op_head;
311 } 313 }
312 314
313
314 GNUNET_SERVER_client_drop(nc->client); 315 GNUNET_SERVER_client_drop(nc->client);
315 GNUNET_CONTAINER_DLL_remove (client_head, client_tail, nc); 316 GNUNET_CONTAINER_DLL_remove (client_head, client_tail, nc);
316 GNUNET_free (nc); 317 GNUNET_free (nc);