aboutsummaryrefslogtreecommitdiff
path: root/src/util/connection.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-16 13:19:52 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-16 13:19:52 +0000
commitb2a1e480c719a09d373005c507d77d0303f263a7 (patch)
tree1946333165f2cfe58933074a62b2c7dba5f9d173 /src/util/connection.c
parent3554b417a8ad6f0017a2dac707e0bacc3ee65ae2 (diff)
downloadgnunet-b2a1e480c719a09d373005c507d77d0303f263a7.tar.gz
gnunet-b2a1e480c719a09d373005c507d77d0303f263a7.zip
add GNUNET_NETWORK_socket_free_memory_only_ API to allow getting raw FD and releasing struct without leaking 'addr' member
Diffstat (limited to 'src/util/connection.c')
-rw-r--r--src/util/connection.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/util/connection.c b/src/util/connection.c
index bdfcd1add..3290abcfc 100644
--- a/src/util/connection.c
+++ b/src/util/connection.c
@@ -1001,8 +1001,10 @@ GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *connection)
1001 if (GNUNET_YES != connection->persist) 1001 if (GNUNET_YES != connection->persist)
1002 GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (connection->sock)); 1002 GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (connection->sock));
1003 else 1003 else
1004 GNUNET_free (connection->sock); /* at least no memory leak (we deliberately 1004 {
1005 * leak the socket in this special case) ... */ 1005 GNUNET_NETWORK_socket_free_memory_only_ (connection->sock); /* at least no memory leak (we deliberately
1006 * leak the socket in this special case) ... */
1007 }
1006 } 1008 }
1007 GNUNET_free_non_null (connection->addr); 1009 GNUNET_free_non_null (connection->addr);
1008 GNUNET_free_non_null (connection->hostname); 1010 GNUNET_free_non_null (connection->hostname);