diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-03-25 10:40:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-03-25 10:40:55 +0000 |
commit | 214fa252fc8f4fd5bed8ad920f61d560bedb3821 (patch) | |
tree | 2f0db06c38d7872cb4b166dbbf6e57e297ed9d8e | |
parent | 11cacc6bb3fb88fb402b3b8013b72a109e095c6c (diff) | |
download | gnunet-214fa252fc8f4fd5bed8ad920f61d560bedb3821.tar.gz gnunet-214fa252fc8f4fd5bed8ad920f61d560bedb3821.zip |
check for NULL
-rw-r--r-- | src/fs/fs_publish.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index e60b07f5b..a5e4a48c3 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c | |||
@@ -833,10 +833,20 @@ do_upload (void *cls, | |||
833 | fn = GNUNET_CONTAINER_meta_data_get_by_type (p->meta, | 833 | fn = GNUNET_CONTAINER_meta_data_get_by_type (p->meta, |
834 | EXTRACTOR_METATYPE_FILENAME); | 834 | EXTRACTOR_METATYPE_FILENAME); |
835 | p = p->dir; | 835 | p = p->dir; |
836 | GNUNET_asprintf (&p->emsg, | 836 | if (fn != NULL) |
837 | _("Recursive upload failed at `%s'"), | 837 | { |
838 | fn); | 838 | GNUNET_asprintf (&p->emsg, |
839 | GNUNET_free (fn); | 839 | _("Recursive upload failed at `%s': %s"), |
840 | fn, | ||
841 | p->emsg); | ||
842 | GNUNET_free (fn); | ||
843 | } | ||
844 | else | ||
845 | { | ||
846 | GNUNET_asprintf (&p->emsg, | ||
847 | _("Recursive upload failed: %s"), | ||
848 | p->emsg); | ||
849 | } | ||
840 | GNUNET_FS_file_information_sync (p); | 850 | GNUNET_FS_file_information_sync (p); |
841 | pi.status = GNUNET_FS_STATUS_PUBLISH_ERROR; | 851 | pi.status = GNUNET_FS_STATUS_PUBLISH_ERROR; |
842 | make_publish_status (&pi, sc, p, 0); | 852 | make_publish_status (&pi, sc, p, 0); |