mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-10-15 02:00:50 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user