From: Christian Grothoff Date: Sun, 25 Oct 2009 10:22:49 +0000 (+0000) Subject: can now be NULL, check X-Git-Tag: initial-import-from-subversion-38251~23268 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=166ceb17b22ae4321056dc975573264f0d2d0e96;p=oweals%2Fgnunet.git can now be NULL, check --- diff --git a/src/util/client.c b/src/util/client.c index d5358cab4..fb4c1c280 100644 --- a/src/util/client.c +++ b/src/util/client.c @@ -221,9 +221,11 @@ finish_cleanup (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) void GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock) { - GNUNET_assert (sock->sock != NULL); - GNUNET_CONNECTION_destroy (sock->sock); - sock->sock = NULL; + if (sock->sock != NULL) + { + GNUNET_CONNECTION_destroy (sock->sock); + sock->sock = NULL; + } sock->receiver_handler = NULL; if (sock->in_receive == GNUNET_YES) sock->in_receive = GNUNET_SYSERR;