free
authorChristian Grothoff <christian@grothoff.org>
Tue, 19 Jul 2011 13:00:29 +0000 (13:00 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 19 Jul 2011 13:00:29 +0000 (13:00 +0000)
src/testing/testing_peergroup.c

index 25a04df078142214d00f9d0a775f261be69883cd..81294a6e372f75e5098e60fb539dc5cf97db4cc5 100644 (file)
@@ -652,7 +652,8 @@ GNUNET_TESTING_peergroup_topology_to_file(struct GNUNET_TESTING_PeerGroup *pg,
                                                               GNUNET_DISK_PERM_USER_WRITE);
   if (topo_ctx->file == NULL)
     {
-      notify_cb(notify_cb_cls, "Failed to open output file!");
+      notify_cb (notify_cb_cls, "Failed to open output file!");
+      GNUNET_free (topo_ctx);
       return;
     }
 
@@ -661,7 +662,6 @@ GNUNET_TESTING_peergroup_topology_to_file(struct GNUNET_TESTING_PeerGroup *pg,
     GNUNET_DISK_file_write(topo_ctx->file, temp_str, temp);
   GNUNET_free_non_null(temp_str);
   GNUNET_TESTING_get_topology(pg, &write_topology_cb, topo_ctx);
-  return;
 }
 
 /**