From 47070e92e48f3ea487c92adb485a1a6dcfa74199 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Wed, 12 Dec 2012 09:54:26 +0000 Subject: [PATCH] fix coverity 10390 --- src/ats/gnunet-service-ats_addresses_simplistic.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ats/gnunet-service-ats_addresses_simplistic.c b/src/ats/gnunet-service-ats_addresses_simplistic.c index 6aa73f7db..84e8911d1 100644 --- a/src/ats/gnunet-service-ats_addresses_simplistic.c +++ b/src/ats/gnunet-service-ats_addresses_simplistic.c @@ -385,7 +385,6 @@ GAS_simplistic_address_delete (void *solver, net = (struct Network *) address->solver_information; - if (GNUNET_NO == session_only) { LOG (GNUNET_ERROR_TYPE_DEBUG, "Deleting %s address %p for peer `%s' from network `%s' (total: %u/ active: %u)\n", @@ -408,6 +407,11 @@ GAS_simplistic_address_delete (void *solver, if (aw->addr == address) break; } + if (NULL == aw ) + { + GNUNET_break (0); + return; + } GNUNET_CONTAINER_DLL_remove (net->head, net->tail, aw); GNUNET_free (aw); } -- 2.25.1