From: Matthias Wachs Date: Wed, 20 Apr 2011 12:18:57 +0000 (+0000) Subject: fixed memory leak X-Git-Tag: initial-import-from-subversion-38251~18634 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3883e08123a017fcad80bce975462f914100738b;p=oweals%2Fgnunet.git fixed memory leak --- diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 522dcf942..cfb51db61 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -2509,6 +2509,8 @@ plugin_env_session_end (void *cls, GNUNET_SCHEDULER_cancel (pos->revalidate_task); pos->revalidate_task = GNUNET_SCHEDULER_NO_TASK; } + GNUNET_free_non_null(pos->ressources); + GNUNET_free_non_null(pos->quality); GNUNET_free (pos); if (nl->received_pong == GNUNET_NO) return; /* nothing to do, never connected... */ @@ -4832,7 +4834,7 @@ disconnect_neighbour (struct NeighbourList *n, int check) peer_pos->ressources = NULL; GNUNET_free(peer_pos->quality); peer_pos->ressources = NULL; - GNUNET_free(peer_pos); + GNUNET_free(peer_pos); } GNUNET_free (rpos); }