From 0824b2dd23f08693d2e4d642f02e7a4e752c7725 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Fri, 17 Jun 2011 08:39:21 +0000 Subject: [PATCH] mem leak --- src/transport/plugin_transport_tcp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 00347bce3..ecb1baa6d 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c @@ -3070,9 +3070,11 @@ libgnunet_plugin_transport_tcp_init (void *cls) plugin->open_port = bport; plugin->adv_port = aport; plugin->bind_address = bind_address; - plugin->external_address = external_address; + plugin->external_address = GNUNET_strdup(external_address); + GNUNET_free_non_null(external_address); if (internal_address != NULL) plugin->internal_address = GNUNET_strdup(internal_address); + GNUNET_free_non_null(internal_address); plugin->behind_nat = behind_nat; plugin->nat_punched = nat_punched; plugin->enable_nat_client = enable_nat_client; @@ -3242,6 +3244,7 @@ libgnunet_plugin_transport_tcp_done (void *cls) } GNUNET_free_non_null(plugin->bind_address); GNUNET_free_non_null(plugin->internal_address); + GNUNET_free_non_null(plugin->external_address); GNUNET_free (plugin); GNUNET_free (api); return NULL; -- 2.25.1