gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r17007 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r17007 - gnunet/src/mesh
Date: Fri, 23 Sep 2011 17:01:51 +0200

Author: bartpolot
Date: 2011-09-23 17:01:51 +0200 (Fri, 23 Sep 2011)
New Revision: 17007

Modified:
   gnunet/src/mesh/gnunet-service-mesh.c
Log:
Fixed double destroy

Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c       2011-09-23 14:02:47 UTC (rev 
17006)
+++ gnunet/src/mesh/gnunet-service-mesh.c       2011-09-23 15:01:51 UTC (rev 
17007)
@@ -505,23 +505,6 @@
 }
 
 
-/**
- * Iterator over hash map peer entries and frees all data in it.
- * Used prior to destroying a hashmap. Makes you miss anonymous functions in C.
- *
- * @param cls closure
- * @param key current key code (will no longer contain valid data!!)
- * @param value value in the hash map (treated as void *)
- * @return GNUNET_YES if we should continue to iterate, GNUNET_NO if not.
- */
-static int
-iterate_free (void *cls, const GNUNET_HashCode * key, void *value)
-{
-  GNUNET_free(value);
-  return GNUNET_YES;
-}
-
-
 
/******************************************************************************/
 /************************    PERIODIC FUNCTIONS    
****************************/
 
/******************************************************************************/
@@ -1130,9 +1113,6 @@
     q = qn;
     /* TODO cancel core transmit ready in case it was active */
   }
-
-  GNUNET_CONTAINER_multihashmap_iterate(t->tree->first_hops, &iterate_free, t);
-  GNUNET_CONTAINER_multihashmap_destroy(t->tree->first_hops);
   tree_destroy(t->tree);
   GNUNET_free (t);
   return r;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]