From: Matthias Wachs Date: Tue, 27 Sep 2011 11:15:59 +0000 (+0000) Subject: mem leak X-Git-Tag: initial-import-from-subversion-38251~16946 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b9ae190b8cfaa9124e284cc46595fa3b52b16696;p=oweals%2Fgnunet.git mem leak --- 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);