From 8d2c058a19de01d7513012fe51066784c14fdbe4 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 24 Jul 2013 19:16:10 +0200 Subject: Fix remote record memory leak --- src/peer.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/peer.c b/src/peer.c index fa48b8d..3915b8e 100644 --- a/src/peer.c +++ b/src/peer.c @@ -230,6 +230,13 @@ static void delete_peer(fastd_context_t *ctx, fastd_peer_t *peer) { if (!peer->config) free(peer->protocol_config); + while (peer->remotes) { + fastd_remote_t *remote = peer->remotes; + peer->remotes = remote->next; + + free(remote); + } + free(peer); } -- cgit v1.2.3