aboutsummaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/misc.c b/misc.c
index 58c4fb7..48088da 100644
--- a/misc.c
+++ b/misc.c
@@ -23,3 +23,13 @@ int rand_upto(int limit)
return (int)n;
}
+
+void free_cfg(config_item *cfg)
+{
+ config_item *i;
+
+ for (i = cfg; i->type != C_END; i++)
+ if (i->type == C_STRING)
+ sfree(i->sval);
+ sfree(cfg);
+}