remote: fix memory leak on host removal
authorDavid Bauer <mail@david-bauer.net>
Sun, 5 Sep 2021 16:05:49 +0000 (18:05 +0200)
committerDavid Bauer <mail@david-bauer.net>
Tue, 21 Sep 2021 17:48:16 +0000 (19:48 +0200)
The host address is allocated on the heap, hence it has to be freed when
freeing the containing struct.

Signed-off-by: David Bauer <mail@david-bauer.net>
remote.c

index 8e6e37eedd5572911de2032dfca1ce960a529952..3ca040ec498bfa994812ef8a7b47e6a967d06b3f 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -195,6 +195,7 @@ remote_node_free(struct usteer_remote_node *node)
                return;
 
        avl_delete(&remote_hosts, &host->avl);
+       free(host->addr);
        free(host);
 }