From: Christian Grothoff Date: Sun, 13 May 2012 19:16:38 +0000 (+0000) Subject: -fix crash on error X-Git-Tag: initial-import-from-subversion-38251~13506 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7ab9567f3e7c8351685edeed8fe424a7219a25c5;p=oweals%2Fgnunet.git -fix crash on error --- diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c index dc345ba2b..df602b37f 100644 --- a/src/core/test_core_quota_compliance.c +++ b/src/core/test_core_quota_compliance.c @@ -169,14 +169,17 @@ terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) GNUNET_TRANSPORT_get_hello_cancel (p1.ghh); GNUNET_TRANSPORT_get_hello_cancel (p2.ghh); - - GNUNET_CORE_disconnect (p1.ch); + if (NULL != p1.ch) + GNUNET_CORE_disconnect (p1.ch); p1.ch = NULL; - GNUNET_CORE_disconnect (p2.ch); + if (NULL != p2.ch) + GNUNET_CORE_disconnect (p2.ch); p2.ch = NULL; - GNUNET_TRANSPORT_disconnect (p1.th); + if (NULL != p1.th) + GNUNET_TRANSPORT_disconnect (p1.th); p1.th = NULL; - GNUNET_TRANSPORT_disconnect (p2.th); + if (NULL != p2.th) + GNUNET_TRANSPORT_disconnect (p2.th); p2.th = NULL; ok = 42; }