fix
authorChristian Grothoff <christian@grothoff.org>
Mon, 5 Apr 2010 13:35:38 +0000 (13:35 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 5 Apr 2010 13:35:38 +0000 (13:35 +0000)
src/fs/gnunet-publish.c

index 767e84af2a904a55f3123e9ccfde43bc727e201e..fc00fd26c623be7f51f2eb0bf7129cec5e1f6265 100644 (file)
@@ -84,6 +84,11 @@ do_stop_task (void *cls,
       p = pc;
       pc = NULL;
       GNUNET_FS_publish_stop (p);
+      if (NULL != meta) 
+       {
+         GNUNET_CONTAINER_meta_data_destroy (meta);
+         meta = NULL;
+       }
     }
 }
 
@@ -296,13 +301,9 @@ publish_inspector (void *cls,
       topKeywords = NULL;
     }
   if (NULL != meta) 
-    {
-      GNUNET_CONTAINER_meta_data_iterate (meta,
-                                         &meta_merger,
-                                         m);
-      GNUNET_CONTAINER_meta_data_destroy (meta);
-      meta = NULL;
-    }
+    GNUNET_CONTAINER_meta_data_iterate (meta,
+                                       &meta_merger,
+                                       m);
   if (! do_disable_creation_time)
     GNUNET_CONTAINER_meta_data_add_publication_date (m);
   if (extract_only)