From 655c015984f9e8d297aad007a737163bd6bd3996 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Sat, 29 Oct 2016 14:56:52 +0000 Subject: [PATCH] - Fix Coverity #153011, abort on NULL path instead of dereferencing later --- src/cadet/gnunet-service-cadet_connection.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c index 4a4de2200..205f0b3b3 100644 --- a/src/cadet/gnunet-service-cadet_connection.c +++ b/src/cadet/gnunet-service-cadet_connection.c @@ -2122,15 +2122,8 @@ GCC_handle_confirm (struct CadetPeer *peer, connection_reset_timeout (c, fwd); - /* Add path to peers? */ - if (NULL != c->path) - { - GCP_add_path_to_all (c->path, GNUNET_YES); - } - else - { - GNUNET_break (0); - } + GNUNET_assert (NULL != c->path); + GCP_add_path_to_all (c->path, GNUNET_YES); /* Message for us as creator? */ if (GNUNET_YES == GCC_is_origin (c, GNUNET_YES)) -- 2.25.1