From 7b915095afe17e549132c1e28628b4cb26683f5e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 20 Feb 2006 15:23:55 +0000 Subject: fix memory leak when freeing static host structs git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1148 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-daemon/static-hosts.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/avahi-daemon/static-hosts.c b/avahi-daemon/static-hosts.c index 23d5384..ae8961b 100644 --- a/avahi-daemon/static-hosts.c +++ b/avahi-daemon/static-hosts.c @@ -221,10 +221,6 @@ void static_hosts_load(int in_chroot) { void static_hosts_free_all (void) { - StaticHost *h; - - for (h = hosts; h; h = hosts->hosts_next) - { - static_host_free (h); - } + while(hosts) + static_host_free(hosts); } -- cgit