summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}