upstream: add free_upstream_list ()

Michael
This commit is contained in:
Michael Adam committed 2009-12-07 00:22:36 +01:00
1 parent 4a8ea0d23b
commit 21aa3ecf60
2 files changed
+13

No files matched your search

+12
View File
@@ -209,4 +209,16 @@ struct upstream *upstream_get (char *host, struct upstream *up)
return up;
}
void free_upstream_list (struct upstream *up)
{
while (up) {
struct upstream *tmp = up;
up = up->next;
safefree (tmp->domain);
safefree (tmp->host);
safefree (tmp);
}
}
#endif