summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-21 11:15:19 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-21 11:15:50 -0500
commit2ea8081a5543e608e747426e01bda14f45e9591b (patch)
treed267e093a3e8f6068ac98154d41f59e117d5455c
parent6fd667e5c97ad8b89cabe2ad7dc6d2d8f4e77891 (diff)
basic/fileio: fix memleak when discarding an invalid variable
Fixes #5405.
-rw-r--r--src/basic/fileio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/fileio.c b/src/basic/fileio.c
index b9a9f74892..13c03b4f55 100644
--- a/src/basic/fileio.c
+++ b/src/basic/fileio.c
@@ -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;
}