From 1c456639363f1a80c4818b3c99511b9f460e5ed8 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 5 Jan 2018 17:18:06 +0100 Subject: fix error handling, do not continue with uninitialized variable after failure --- src/peerinfo/gnunet-service-peerinfo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/peerinfo/gnunet-service-peerinfo.c') diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index af1eb2d1d..83a7b589b 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c @@ -559,11 +559,11 @@ hosts_directory_scan_callback (void *cls, if (GNUNET_OK != GNUNET_HELLO_get_id (r.friend_only_hello, &id_friend)) + { if (GNUNET_YES == dsc->remove_files) - { remove_garbage (fullname); - return GNUNET_OK; - } + return GNUNET_OK; + } id = id_friend; } if (NULL != r.hello) @@ -571,11 +571,11 @@ hosts_directory_scan_callback (void *cls, if (GNUNET_OK != GNUNET_HELLO_get_id (r.hello, &id_public)) + { if (GNUNET_YES == dsc->remove_files) - { remove_garbage (fullname); - return GNUNET_OK; - } + return GNUNET_OK; + } id = id_public; } -- cgit v1.2.3