diff options
-rw-r--r-- | src/fs/fs.c | 9 | ||||
-rw-r--r-- | src/fs/test_fs_search_persistence.c | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/fs/fs.c b/src/fs/fs.c index 593d3d197..a569ce27a 100644 --- a/src/fs/fs.c +++ b/src/fs/fs.c | |||
@@ -965,6 +965,13 @@ deserialize_file_information (struct GNUNET_FS_Handle *h, | |||
965 | emsg); | 965 | emsg); |
966 | GNUNET_free (emsg); | 966 | GNUNET_free (emsg); |
967 | } | 967 | } |
968 | if (ret == NULL) | ||
969 | { | ||
970 | if (0 != UNLINK (filename)) | ||
971 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, | ||
972 | "unlink", | ||
973 | filename); | ||
974 | } | ||
968 | return ret; | 975 | return ret; |
969 | } | 976 | } |
970 | 977 | ||
@@ -1486,7 +1493,7 @@ deserialize_publish_file (void *cls, | |||
1486 | GNUNET_FS_file_information_destroy (pc->fi, NULL, NULL); | 1493 | GNUNET_FS_file_information_destroy (pc->fi, NULL, NULL); |
1487 | if (0 != UNLINK (filename)) | 1494 | if (0 != UNLINK (filename)) |
1488 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", filename); | 1495 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", filename); |
1489 | GNUNET_free_non_null (pc->serialization); | 1496 | GNUNET_free (pc->serialization); |
1490 | GNUNET_free (pc); | 1497 | GNUNET_free (pc); |
1491 | return GNUNET_OK; | 1498 | return GNUNET_OK; |
1492 | } | 1499 | } |
diff --git a/src/fs/test_fs_search_persistence.c b/src/fs/test_fs_search_persistence.c index eb25a2082..ebcf10f9a 100644 --- a/src/fs/test_fs_search_persistence.c +++ b/src/fs/test_fs_search_persistence.c | |||
@@ -359,6 +359,7 @@ main (int argc, char *argv[]) | |||
359 | GNUNET_GETOPT_OPTION_END | 359 | GNUNET_GETOPT_OPTION_END |
360 | }; | 360 | }; |
361 | 361 | ||
362 | GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-search/"); | ||
362 | GNUNET_log_setup ("test_fs_search_persistence", | 363 | GNUNET_log_setup ("test_fs_search_persistence", |
363 | #if VERBOSE | 364 | #if VERBOSE |
364 | "DEBUG", | 365 | "DEBUG", |
@@ -367,7 +368,7 @@ main (int argc, char *argv[]) | |||
367 | #endif | 368 | #endif |
368 | NULL); | 369 | NULL); |
369 | GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1, | 370 | GNUNET_PROGRAM_run ((sizeof (argvx) / sizeof (char *)) - 1, |
370 | argvx, "test-fs-search-persistencce", | 371 | argvx, "test-fs-search-persistence", |
371 | "nohelp", options, &run, NULL); | 372 | "nohelp", options, &run, NULL); |
372 | stop_arm (&p1); | 373 | stop_arm (&p1); |
373 | GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-search/"); | 374 | GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-search/"); |