From: Sree Harsha Totakura Date: Fri, 20 Jul 2012 15:03:54 +0000 (+0000) Subject: fix NULL memory access X-Git-Tag: initial-import-from-subversion-38251~12405 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5d0db16debeb4c6b7c9bea513e7d2de8341de231;p=oweals%2Fgnunet.git fix NULL memory access --- diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c index 5cc9482b4..a80b63c0e 100644 --- a/src/testbed/gnunet-service-testbed.c +++ b/src/testbed/gnunet-service-testbed.c @@ -1481,10 +1481,12 @@ shutdown_task (void *cls, if (NULL != slave_list[id]->controller_proc) GNUNET_TESTBED_controller_stop (slave_list[id]->controller_proc); } - GNUNET_free_non_null (master_context->master_ip); - if (NULL != master_context->system) - GNUNET_TESTING_system_destroy (master_context->system, GNUNET_YES); - GNUNET_free_non_null (master_context); + if (NULL != master_context) + { + GNUNET_free_non_null (master_context->master_ip); + if (NULL != master_context->system) + GNUNET_TESTING_system_destroy (master_context->system, GNUNET_YES); + } }