From: Bart Polot Date: Tue, 14 Feb 2012 10:56:31 +0000 (+0000) Subject: - Cancel task to prevent acessing freed memory X-Git-Tag: initial-import-from-subversion-38251~14856 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8115a8a636bc95e2b80651a889b60244d1233f78;p=oweals%2Fgnunet.git - Cancel task to prevent acessing freed memory --- diff --git a/src/testing/testing.c b/src/testing/testing.c index 023b607eb..70da138a7 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c @@ -1668,6 +1668,8 @@ GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d, GNUNET_free_non_null (del_arg); d->max_timeout = GNUNET_TIME_relative_to_absolute (timeout); + if (GNUNET_SCHEDULER_NO_TASK != d->task) + GNUNET_SCHEDULER_cancel(d->task); d->task = GNUNET_SCHEDULER_add_now (&start_fsm, d); }