aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-01-05 17:18:06 +0100
committerChristian Grothoff <christian@grothoff.org>2018-01-05 17:18:06 +0100
commit1c456639363f1a80c4818b3c99511b9f460e5ed8 (patch)
treec490b0b1d42be2985b8b76c76da1d2586542b8ff
parent918491c8a9dd38cbe51dbdf2db650436ec63ac40 (diff)
downloadgnunet-1c456639363f1a80c4818b3c99511b9f460e5ed8.tar.gz
gnunet-1c456639363f1a80c4818b3c99511b9f460e5ed8.zip
fix error handling, do not continue with uninitialized variable after failure
-rw-r--r--src/peerinfo/gnunet-service-peerinfo.c12
1 files changed, 6 insertions, 6 deletions
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,
559 if (GNUNET_OK != 559 if (GNUNET_OK !=
560 GNUNET_HELLO_get_id (r.friend_only_hello, 560 GNUNET_HELLO_get_id (r.friend_only_hello,
561 &id_friend)) 561 &id_friend))
562 {
562 if (GNUNET_YES == dsc->remove_files) 563 if (GNUNET_YES == dsc->remove_files)
563 {
564 remove_garbage (fullname); 564 remove_garbage (fullname);
565 return GNUNET_OK; 565 return GNUNET_OK;
566 } 566 }
567 id = id_friend; 567 id = id_friend;
568 } 568 }
569 if (NULL != r.hello) 569 if (NULL != r.hello)
@@ -571,11 +571,11 @@ hosts_directory_scan_callback (void *cls,
571 if (GNUNET_OK != 571 if (GNUNET_OK !=
572 GNUNET_HELLO_get_id (r.hello, 572 GNUNET_HELLO_get_id (r.hello,
573 &id_public)) 573 &id_public))
574 {
574 if (GNUNET_YES == dsc->remove_files) 575 if (GNUNET_YES == dsc->remove_files)
575 {
576 remove_garbage (fullname); 576 remove_garbage (fullname);
577 return GNUNET_OK; 577 return GNUNET_OK;
578 } 578 }
579 id = id_public; 579 id = id_public;
580 } 580 }
581 581