From: Christian Grothoff Date: Sat, 9 Jun 2012 13:39:17 +0000 (+0000) Subject: -fixing #2413 X-Git-Tag: initial-import-from-subversion-38251~13220 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e59b32948cba58249c9b19e7426602dbe4f20d00;p=oweals%2Fgnunet.git -fixing #2413 --- diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c index 86402048e..ec959433a 100644 --- a/src/fs/fs_api.c +++ b/src/fs/fs_api.c @@ -924,6 +924,7 @@ deserialize_file_information (struct GNUNET_FS_Handle *h, const char *filename) struct GNUNET_FS_FileInformation *ret; struct GNUNET_BIO_ReadHandle *rh; char *emsg; + char *fn; rh = get_read_handle (h, GNUNET_FS_SYNC_PATH_FILE_INFO, filename); if (rh == NULL) @@ -938,8 +939,13 @@ deserialize_file_information (struct GNUNET_FS_Handle *h, const char *filename) } if (ret == NULL) { - if (0 != UNLINK (filename)) - GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", filename); + fn = get_serialization_file_name (h, GNUNET_FS_SYNC_PATH_FILE_INFO, filename); + if (NULL != fn) + { + if (0 != UNLINK (fn)) + GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", fn); + GNUNET_free (fn); + } } return ret; }