mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-14 01:57:27 +03:00
basic/fileio: fix memleak when discarding an invalid variable
Fixes #5405.
This commit is contained in:
parent
6fd667e5c9
commit
2ea8081a55
@ -780,6 +780,7 @@ static int merge_env_file_push(
|
||||
|
||||
if (!env_name_is_valid(key)) {
|
||||
log_error("%s:%u: invalid variable name \"%s\", ignoring.", strna(filename), line, key);
|
||||
free(value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user