conf-parser: don't leak section names

If we encounter an unknown section, we must free the previous section before
clearing the pointer.
This commit is contained in:
Tom Gundersen
2013-11-20 17:51:42 +01:00
parent 0cc1125ae1
commit 91ffff9621

View File

@@ -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);