summaryrefslogtreecommitdiff
path: root/src/upstream.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/upstream.c')
-rw-r--r--src/upstream.c12
1 files changed, 12 insertions, 0 deletions
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