summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-07-24 19:16:10 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-07-24 19:16:10 +0200
commit8d2c058a19de01d7513012fe51066784c14fdbe4 (patch)
tree29dc82da72ebd15e252aee49d2a766d72e50534e
parent95491f3b7e800b3b0e58ea4eaf35e8270b46470f (diff)
downloadfastd-8d2c058a19de01d7513012fe51066784c14fdbe4.tar
fastd-8d2c058a19de01d7513012fe51066784c14fdbe4.zip
Fix remote record memory leak
-rw-r--r--src/peer.c7
1 files changed, 7 insertions, 0 deletions
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);
}