summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2013-11-20 17:51:42 +0100
committerTom Gundersen <teg@jklm.no>2013-11-20 17:54:09 +0100
commit91ffff9621757cb585bfce1cafc98218f89cc466 (patch)
tree3be114ceb17eeb150d11d06e4ffc31f142806aa7 /src
parent0cc1125ae10a216f2b27cb2828849ac1beb6a1b1 (diff)
conf-parser: don't leak section names
If we encounter an unknown section, we must free the previous section before clearing the pointer.
Diffstat (limited to 'src')
-rw-r--r--src/shared/conf-parser.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
index efd2147e79..95d64fcca2 100644
--- a/src/shared/conf-parser.c
+++ b/src/shared/conf-parser.c
@@ -260,6 +260,7 @@ static int parse_line(const char* unit,
"Unknown section '%s'. Ignoring.", n);
free(n);
+ free(*section);
*section = NULL;
} else {
free(*section);