From 21aa3ecf60e5e6e54a9775876ae9e0eb6224e9cd Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sun, 6 Dec 2009 13:26:50 +0100 Subject: upstream: add free_upstream_list () Michael --- src/upstream.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/upstream.c') diff --git a/src/upstream.c b/src/upstream.c index dd91817..3966f06 100644 --- a/src/upstream.c +++ b/src/upstream.c @@ -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 -- cgit v1.2.3