summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-12-06 01:31:14 +0100
committerMichael Adam <obnox@samba.org>2009-12-06 01:55:53 +0100
commitf60aa477155d6b4a3a0d00d52936b9ce16bc3283 (patch)
tree82153dc35085554b20fe2cf330d716f68e3d2ee7
parent5e399a7e17bb8d719005f18d8d77f62993c6de7d (diff)
downloadtinyproxy-f60aa477155d6b4a3a0d00d52936b9ce16bc3283.tar.gz
tinyproxy-f60aa477155d6b4a3a0d00d52936b9ce16bc3283.zip
conf: allow set_string_arg to overwrite previous values (i.e. don't leak)
Michael
-rw-r--r--src/conf.c4
1 files changed, 4 insertions, 0 deletions
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;