changes
authorMatthias Wachs <wachs@net.in.tum.de>
Tue, 11 Dec 2012 13:56:18 +0000 (13:56 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Tue, 11 Dec 2012 13:56:18 +0000 (13:56 +0000)
src/ats/gnunet-service-ats_addresses_simplistic.c

index fd33fd7e6e80fc710c2e81cd17b0ba6228a2e020..cd35008abe273089623abafb026c4498480092ee 100644 (file)
@@ -352,6 +352,13 @@ GAS_simplistic_address_delete (void *solver, struct GNUNET_CONTAINER_MultiHashMa
 
   GNUNET_break (0 < net->total_addresses);
   net->total_addresses --;
+  for (aw = net->head; NULL != aw; aw = aw->next)
+  {
+      if (aw->addr == address)
+        break;
+  }
+  GNUNET_CONTAINER_DLL_remove (net->head, net->tail, aw);
+  GNUNET_free (aw);
 
   if (GNUNET_YES == address->active)
   {
@@ -363,13 +370,6 @@ GAS_simplistic_address_delete (void *solver, struct GNUNET_CONTAINER_MultiHashMa
       update_quota_per_network (s, net, NULL);
   }
 
-  for (aw = net->head; NULL != aw; aw = aw->next)
-  {
-      if (aw->addr == address)
-        break;
-  }
-  GNUNET_CONTAINER_DLL_remove (net->head, net->tail, aw);
-  GNUNET_free (aw);
 
 }