From 36f1683c74b94e70e53471f7f08f6c16e042f562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?= =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Sat, 26 Nov 2011 15:58:11 +0400 Subject: [PATCH 3/3] Fix dht multipeer testing crash #2 --- src/testing/testing.c | 24 ++++++++++++++++++++---- 1 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/testing/testing.c b/src/testing/testing.c index 091daf1..f53f14b 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c @@ -545,8 +545,16 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) (NULL == d->hostname) ? _("`gnunet-arm' does not seem to terminate.\n") : _("`ssh' does not seem to terminate.\n")); - GNUNET_CONFIGURATION_destroy (d->cfg); - GNUNET_free (d->cfgfile); + if (d->cfg != NULL) + { + GNUNET_CONFIGURATION_destroy (d->cfg); + d->cfg = NULL; + } + if (d->cfgfile != NULL) + { + GNUNET_free (d->cfgfile); + d->cfgfile = NULL; + } GNUNET_free_non_null (d->hostname); GNUNET_free_non_null (d->username); GNUNET_free (d->proc); @@ -730,8 +738,16 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) GNUNET_TRANSPORT_disconnect (d->th); d->th = NULL; } - GNUNET_CONFIGURATION_destroy (d->cfg); - GNUNET_free (d->cfgfile); + if (d->cfg != NULL) + { + GNUNET_CONFIGURATION_destroy (d->cfg); + d->cfg = NULL; + } + if (d->cfgfile != NULL) + { + GNUNET_free (d->cfgfile); + d->cfgfile = NULL; + } GNUNET_free_non_null (d->hello); GNUNET_free_non_null (d->hostname); GNUNET_free_non_null (d->username); -- 1.7.4