diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-05-07 23:42:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-05-07 23:42:28 +0000 |
commit | bfa8316970a7dce659585a038458bc41776ed965 (patch) | |
tree | d6c23c6731fe3b8ae2f5206fe7172be9b4db1f10 /src/util/connection.c | |
parent | 6e659b41e60f82e0a5d419f2c5c818a340b0917c (diff) | |
download | gnunet-bfa8316970a7dce659585a038458bc41776ed965.tar.gz gnunet-bfa8316970a7dce659585a038458bc41776ed965.zip |
stuff
Diffstat (limited to 'src/util/connection.c')
-rw-r--r-- | src/util/connection.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/util/connection.c b/src/util/connection.c index 4a54aed1d..a877e06c2 100644 --- a/src/util/connection.c +++ b/src/util/connection.c | |||
@@ -539,9 +539,14 @@ destroy_continuation (void *cls, | |||
539 | notify (sock->nth.notify_ready_cls, 0, NULL); | 539 | notify (sock->nth.notify_ready_cls, 0, NULL); |
540 | } | 540 | } |
541 | 541 | ||
542 | if ((sock->sock != NULL) && (sock->persist != GNUNET_YES)) | 542 | if (sock->sock != NULL) |
543 | GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (sock->sock)); | 543 | { |
544 | 544 | if (sock->persist != GNUNET_YES) | |
545 | GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (sock->sock)); | ||
546 | else | ||
547 | GNUNET_free (sock->sock); /* at least no memory leak (we deliberately | ||
548 | leak the socket in this special case) ... */ | ||
549 | } | ||
545 | GNUNET_free_non_null (sock->addr); | 550 | GNUNET_free_non_null (sock->addr); |
546 | GNUNET_free_non_null (sock->hostname); | 551 | GNUNET_free_non_null (sock->hostname); |
547 | #if DEBUG_CONNECTION | 552 | #if DEBUG_CONNECTION |