Do not crash if key is NULL.
[oweals/gnunet.git] / src / fs / perf_gnunet_service_fs_p2p_respect.c
index b2471a8b4eb6d83f4f5fff674d3006830ac6575c..4d6de9a90631f18ae18982ed483e9922bc3ff30d 100644 (file)
@@ -308,7 +308,7 @@ do_report (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     return;                   /* more downloads to come */
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Finished all downloads, getting statistics\n");
-  sm = GNUNET_malloc (sizeof (struct StatMaster));
+  sm = GNUNET_new (struct StatMaster);
   sm->op =
     GNUNET_TESTBED_service_connect (NULL,
                                    daemons[sm->daemon],