- fix
authorMatthias Wachs <wachs@net.in.tum.de>
Mon, 27 Feb 2012 09:29:48 +0000 (09:29 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Mon, 27 Feb 2012 09:29:48 +0000 (09:29 +0000)
src/namestore/gnunet-service-namestore.c

index e4f7a2b37ae426735d7ba367a3463b40e1b5b3d4..e7c03bf213a3f1232a56cfdb5fc81747cfd9544c 100644 (file)
@@ -92,15 +92,17 @@ cleanup_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Stopping namestore service\n");
 
   struct GNUNET_NAMESTORE_Operation * no;
+  struct GNUNET_NAMESTORE_Operation * tmp;
   struct GNUNET_NAMESTORE_Client * nc;
   struct GNUNET_NAMESTORE_Client * next;
 
   for (nc = client_head; nc != NULL; nc = next)
   {
     next = nc->next;
-    for (no = nc->op_head; no != NULL; no = no->next)
+    for (no = nc->op_head; no != NULL; no = tmp)
     {
       GNUNET_CONTAINER_DLL_remove (nc->op_head, nc->op_tail, no);
+      tmp = no->next;
       GNUNET_free (no);
     }