stuff
authorChristian Grothoff <christian@grothoff.org>
Fri, 7 May 2010 06:51:51 +0000 (06:51 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 7 May 2010 06:51:51 +0000 (06:51 +0000)
src/fs/fs.c
src/fs/test_fs_search_persistence.c

index 593d3d1973d1e8c6411dd8e69b4eca99f45c23c5..a569ce27a57b7878d97b19e2309aef4377f500eb 100644 (file)
@@ -965,6 +965,13 @@ deserialize_file_information (struct GNUNET_FS_Handle *h,
                  emsg);
       GNUNET_free (emsg);
     }
+  if (ret == NULL)
+    {
+      if (0 != UNLINK (filename))
+       GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING,
+                                 "unlink",
+                                 filename);
+    }
   return ret;
 }
 
@@ -1486,7 +1493,7 @@ deserialize_publish_file (void *cls,
     GNUNET_FS_file_information_destroy (pc->fi, NULL, NULL);
   if (0 != UNLINK (filename))
     GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", filename);
-  GNUNET_free_non_null (pc->serialization);
+  GNUNET_free (pc->serialization);
   GNUNET_free (pc);
   return GNUNET_OK;
 }
index eb25a2082d3c27e4aadefb7eee1b8d1f32d8b2f6..ebcf10f9ae9a871ebb2678dbb792bef6699a3315 100644 (file)
@@ -359,6 +359,7 @@ main (int argc, char *argv[])
     GNUNET_GETOPT_OPTION_END
   };
 
+  GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-search/");
   GNUNET_log_setup ("test_fs_search_persistence", 
 #if VERBOSE
                    "DEBUG",
@@ -367,7 +368,7 @@ main (int argc, char *argv[])
 #endif
                    NULL);
   GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1,
-                      argvx, "test-fs-search-persistencce",
+                      argvx, "test-fs-search-persistence",
                      "nohelp", options, &run, NULL);
   stop_arm (&p1);
   GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-search/");