diff options
author | Tom Gundersen <teg@jklm.no> | 2013-11-20 17:51:42 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2013-11-20 17:54:09 +0100 |
commit | 91ffff9621757cb585bfce1cafc98218f89cc466 (patch) | |
tree | 3be114ceb17eeb150d11d06e4ffc31f142806aa7 | |
parent | 0cc1125ae10a216f2b27cb2828849ac1beb6a1b1 (diff) |
conf-parser: don't leak section names
If we encounter an unknown section, we must free the previous section before
clearing the pointer.
-rw-r--r-- | src/shared/conf-parser.c | 1 |
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); |