From: Christian Grothoff Date: Fri, 5 Jan 2018 16:18:06 +0000 (+0100) Subject: fix error handling, do not continue with uninitialized variable after failure X-Git-Tag: gnunet-0.11.0rc0~11^2~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1c456639363f1a80c4818b3c99511b9f460e5ed8;p=oweals%2Fgnunet.git fix error handling, do not continue with uninitialized variable after failure --- 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; }