aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2016-10-29 14:56:52 +0000
committerBart Polot <bart@net.in.tum.de>2016-10-29 14:56:52 +0000
commit655c015984f9e8d297aad007a737163bd6bd3996 (patch)
treec6d8ec177dc181c1f212fa5544a41d00428b4c6d
parent04d5943630fd2e30978bcd5b1fa0b1b80822b086 (diff)
downloadgnunet-655c015984f9e8d297aad007a737163bd6bd3996.tar.gz
gnunet-655c015984f9e8d297aad007a737163bd6bd3996.zip
- Fix Coverity #153011, abort on NULL path instead of dereferencing later
-rw-r--r--src/cadet/gnunet-service-cadet_connection.c11
1 files 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,
2122 2122
2123 connection_reset_timeout (c, fwd); 2123 connection_reset_timeout (c, fwd);
2124 2124
2125 /* Add path to peers? */ 2125 GNUNET_assert (NULL != c->path);
2126 if (NULL != c->path) 2126 GCP_add_path_to_all (c->path, GNUNET_YES);
2127 {
2128 GCP_add_path_to_all (c->path, GNUNET_YES);
2129 }
2130 else
2131 {
2132 GNUNET_break (0);
2133 }
2134 2127
2135 /* Message for us as creator? */ 2128 /* Message for us as creator? */
2136 if (GNUNET_YES == GCC_is_origin (c, GNUNET_YES)) 2129 if (GNUNET_YES == GCC_is_origin (c, GNUNET_YES))