-do not call with NULL
authorChristian Grothoff <christian@grothoff.org>
Sat, 9 Nov 2013 20:47:53 +0000 (20:47 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 9 Nov 2013 20:47:53 +0000 (20:47 +0000)
src/fs/fs_test_lib.c

index 1db777a7ac03efa02c13810eace14c9e28a32da3..085ea3764d0d6078accaa0ccf40cf2cb3c7195fc 100644 (file)
@@ -196,7 +196,8 @@ report_uri (void *cls,
                    ? po->publish_tmp_file
                    : NULL);
   GNUNET_FS_uri_destroy (po->publish_uri);
-  if (GNUNET_YES != po->do_index)
+  if ( (GNUNET_YES != po->do_index) &&
+       (NULL != po->publish_tmp_file) )
     (void) GNUNET_DISK_directory_remove (po->publish_tmp_file);
   GNUNET_free_non_null (po->publish_tmp_file);
   GNUNET_free (po);