From: Julius Bünger Date: Tue, 26 Jun 2018 21:03:04 +0000 (+0200) Subject: rps cli: fix codesonars NULL-dereference warning X-Git-Tag: v0.11.0~332^2~7 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8d2ae5b0fa8a48b2fd975d3e7217b2331940c4d3;p=oweals%2Fgnunet.git rps cli: fix codesonars NULL-dereference warning --- diff --git a/src/rps/gnunet-rps.c b/src/rps/gnunet-rps.c index 739f71dac..b3785a733 100644 --- a/src/rps/gnunet-rps.c +++ b/src/rps/gnunet-rps.c @@ -150,6 +150,11 @@ run (void *cls, static struct GNUNET_PeerIdentity zero_pid; rps_handle = GNUNET_RPS_connect (cfg); + if (NULL == rps_handle) + { + FPRINTF (stderr, "Failed to connect to the rps service\n"); + return; + } if ((0 == memcmp (&zero_pid, &peer_id, sizeof (peer_id))) && (!view_update))