Fix remote record memory leak

This commit is contained in:
Matthias Schiffer 2013-07-24 19:16:10 +02:00
parent 95491f3b7e
commit 8d2c058a19

View file

@ -230,6 +230,13 @@ static void delete_peer(fastd_context_t *ctx, fastd_peer_t *peer) {
if (!peer->config) if (!peer->config)
free(peer->protocol_config); free(peer->protocol_config);
while (peer->remotes) {
fastd_remote_t *remote = peer->remotes;
peer->remotes = remote->next;
free(remote);
}
free(peer); free(peer);
} }