From b0ee2cbddcdf5a2361ff168b8aeef5fb28d37014 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 9 Mar 2012 20:57:28 +0000 Subject: [PATCH] -do not call uri_to_string with NULL pointer --- src/fs/fs_api.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c index 29539a498..9acec5be4 100644 --- a/src/fs/fs_api.c +++ b/src/fs/fs_api.c @@ -1539,7 +1539,10 @@ GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc) GNUNET_break (0); goto cleanup; } - uris = GNUNET_FS_uri_to_string (uc->ksk_uri); + if (NULL != uc->ksk_uri) + uris = GNUNET_FS_uri_to_string (uc->ksk_uri); + else + uris = NULL; if ((GNUNET_OK != GNUNET_BIO_write_string (wh, uc->filename)) || (GNUNET_OK != GNUNET_BIO_write_int64 (wh, uc->file_size)) || (GNUNET_OK != write_start_time (wh, uc->start_time)) || -- 2.25.1