1
1
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:
Zbigniew Jędrzejewski-Szmek 2017-02-21 11:15:19 -05:00
parent 6fd667e5c9
commit 2ea8081a55

View File

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