-fixing qpe counter -- #2555
authorChristian Grothoff <christian@grothoff.org>
Sun, 7 Oct 2012 11:06:37 +0000 (11:06 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 7 Oct 2012 11:06:37 +0000 (11:06 +0000)
src/fs/gnunet-service-fs_pe.c

index 904d028327bbeed3ca53af8fbc0e4df6eb9cd726..f20021a8c749575e4dd961760ceb4c19e394cccd 100644 (file)
@@ -663,6 +663,7 @@ GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp)
       GNUNET_free (prl->rpr);
       GNUNET_free (prl);
     }
+    plan_count--;
     GNUNET_free (rp);
   }
   GNUNET_CONTAINER_heap_destroy (pp->priority_heap);
@@ -679,11 +680,11 @@ GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp)
       GNUNET_free (prl->rpr);
       GNUNET_free (prl);
     }
+    plan_count--;
     GNUNET_free (rp);
   }
   GNUNET_STATISTICS_set (GSF_stats, gettext_noop ("# query plan entries"),
                          plan_count, GNUNET_NO);
-
   GNUNET_CONTAINER_heap_destroy (pp->delay_heap);
   GNUNET_CONTAINER_multihashmap_destroy (pp->plan_map);
   GNUNET_free (pp);