From b9ae190b8cfaa9124e284cc46595fa3b52b16696 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Tue, 27 Sep 2011 11:15:59 +0000 Subject: [PATCH] mem leak --- src/transport/plugin_transport_http_client.c | 2 -- src/transport/plugin_transport_http_new.c | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index bc2051eef..89acb4641 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c @@ -205,8 +205,6 @@ client_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) #endif client_disconnect(s); //GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,"Notifying about ended session to peer `%s' `%s'\n", GNUNET_i2s (&s->target), http_plugin_address_to_string (plugin, s->addr, s->addrlen)); - if (s->msg_tk != NULL) - GNUNET_SERVER_mst_destroy (s->msg_tk); notify_session_end (plugin, &s->target, s); } } diff --git a/src/transport/plugin_transport_http_new.c b/src/transport/plugin_transport_http_new.c index 66f79b3c4..ca55d1d1d 100644 --- a/src/transport/plugin_transport_http_new.c +++ b/src/transport/plugin_transport_http_new.c @@ -398,6 +398,11 @@ lookup_session (struct Plugin *plugin, const struct GNUNET_PeerIdentity *target, void delete_session (struct Session *s) { + if (s->msg_tk != NULL) + { + GNUNET_SERVER_mst_destroy (s->msg_tk); + s->msg_tk = NULL; + } GNUNET_free (s->addr); GNUNET_free_non_null(s->server_recv); GNUNET_free_non_null(s->server_send); -- 2.25.1