- Fix Coverity #153011, abort on NULL path instead of dereferencing later
authorBart Polot <bart@net.in.tum.de>
Sat, 29 Oct 2016 14:56:52 +0000 (14:56 +0000)
committerBart Polot <bart@net.in.tum.de>
Sat, 29 Oct 2016 14:56:52 +0000 (14:56 +0000)
src/cadet/gnunet-service-cadet_connection.c

index 4a4de2200e81dc47c9d8aaeccde1dd82c4f557bb..205f0b3b306dc721e8e9b8d156d2d6ea7a4bf5bb 100644 (file)
@@ -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))