diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-07-24 19:16:10 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-07-24 19:16:10 +0200 |
commit | 8d2c058a19de01d7513012fe51066784c14fdbe4 (patch) | |
tree | 29dc82da72ebd15e252aee49d2a766d72e50534e /src | |
parent | 95491f3b7e800b3b0e58ea4eaf35e8270b46470f (diff) | |
download | fastd-8d2c058a19de01d7513012fe51066784c14fdbe4.tar fastd-8d2c058a19de01d7513012fe51066784c14fdbe4.zip |
Fix remote record memory leak
Diffstat (limited to 'src')
-rw-r--r-- | src/peer.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); } |