- fix
authorMatthias Wachs <wachs@net.in.tum.de>
Tue, 14 Feb 2012 13:32:48 +0000 (13:32 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Tue, 14 Feb 2012 13:32:48 +0000 (13:32 +0000)
src/transport/plugin_transport_udp.c

index c5b74b2cb803822624e0225b5879d83da168a712..ff3c0daeaccc673cbd10409babc77bd6603aff9e 100644 (file)
@@ -532,6 +532,7 @@ disconnect_and_free_it (void *cls, const GNUNET_HashCode * key, void *value)
   struct Plugin *plugin = cls;
   struct Session *s = value;
   struct UDPMessageWrapper *udpw;
+  struct UDPMessageWrapper *next;
 
 #if DEBUG_UDP
   LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -552,6 +553,7 @@ disconnect_and_free_it (void *cls, const GNUNET_HashCode * key, void *value)
   udpw = plugin->msg_head;
   while (udpw != NULL)
   {
+    next = udpw->next;
     if (udpw->session == s)
     {
       GNUNET_CONTAINER_DLL_remove(plugin->msg_head, plugin->msg_tail, udpw);
@@ -560,7 +562,7 @@ disconnect_and_free_it (void *cls, const GNUNET_HashCode * key, void *value)
         udpw->cont (udpw->cont_cls, &s->target, GNUNET_SYSERR);
       GNUNET_free (udpw);
     }
-    udpw = plugin->msg_head;
+    udpw = next;
   }
 
   GNUNET_assert (GNUNET_YES ==