aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Durner <durner@gnunet.org>2005-11-03 17:42:55 +0000
committerNils Durner <durner@gnunet.org>2005-11-03 17:42:55 +0000
commit1ffdd8727f53065f82f7ae936ccf8b5b04bc597f (patch)
tree41104b26dca6157ac35a6e1a1fcda79d21da2275
parentef7e489556cf667de19b33ddab92a4f92109f44b (diff)
downloadgnunet-gtk-1ffdd8727f53065f82f7ae936ccf8b5b04bc597f.tar.gz
gnunet-gtk-1ffdd8727f53065f82f7ae936ccf8b5b04bc597f.zip
don't free null pointer
-rw-r--r--src/plugins/fs/download.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/fs/download.c b/src/plugins/fs/download.c
index 886af8a2..2cfd36c2 100644
--- a/src/plugins/fs/download.c
+++ b/src/plugins/fs/download.c
@@ -475,8 +475,10 @@ void displayDownloadComplete(const struct ECRS_URI * uri,
475 "INCOMINGDIR", 475 "INCOMINGDIR",
476 _("You must specify a directory in the configuration" 476 _("You must specify a directory in the configuration"
477 " in section `%s' under `%s'.")); 477 " in section `%s' under `%s'."));
478 if (!dstPath) 478 if (!dstPath) {
479 FREENONNULL(ren);
479 return; 480 return;
481 }
480 482
481 /* If file is contained in a directory, create directory structure in 483 /* If file is contained in a directory, create directory structure in
482 the file system. */ 484 the file system. */
@@ -503,7 +505,7 @@ void displayDownloadComplete(const struct ECRS_URI * uri,
503 ln ? ln : fn, STRERROR(errno)); 505 ln ? ln : fn, STRERROR(errno));
504 506
505 FREE(dstFile); 507 FREE(dstFile);
506 FREE(ren); 508 FREENONNULL(ren);
507 509
508 return; 510 return;
509 } 511 }
@@ -518,7 +520,7 @@ void displayDownloadComplete(const struct ECRS_URI * uri,
518 LOG(LOG_ERROR, _("Could not move or copy downloaded file %s to %s: %s."), 520 LOG(LOG_ERROR, _("Could not move or copy downloaded file %s to %s: %s."),
519 fnURL, dstFile, STRERROR(errno)); 521 fnURL, dstFile, STRERROR(errno));
520 FREE(dstFile); 522 FREE(dstFile);
521 FREE(ren); 523 FREENONNULL(ren);
522 524
523 return; 525 return;
524 } 526 }