]> git.meshlink.io Git - catta/commitdiff
fix memory leak when freeing static host structs
authorLennart Poettering <lennart@poettering.net>
Mon, 20 Feb 2006 15:23:55 +0000 (15:23 +0000)
committerLennart Poettering <lennart@poettering.net>
Mon, 20 Feb 2006 15:23:55 +0000 (15:23 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1148 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-daemon/static-hosts.c

index 23d5384f9ea80eb2b7fe6dbe15afc8da1a6ae949..ae8961b6ea3f2abe2629b32d13395f2b98b345d3 100644 (file)
@@ -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);
 }