From f60aa477155d6b4a3a0d00d52936b9ce16bc3283 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sun, 6 Dec 2009 01:31:14 +0100 Subject: conf: allow set_string_arg to overwrite previous values (i.e. don't leak) Michael --- src/conf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/conf.c b/src/conf.c index 9660ed0..19e6b5a 100644 --- a/src/conf.c +++ b/src/conf.c @@ -385,6 +385,10 @@ static int set_string_arg (char **var, const char *line, regmatch_t * match) if (!arg) return -1; + if (*var != NULL) { + safefree (*var); + } + *var = arg; return 0; -- cgit v1.2.3