chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2da2873
)
basic/fileio: fix memleak when discarding an invalid variable
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Tue, 21 Feb 2017 16:15:19 +0000
(11:15 -0500)
committer
Sven Eden
<yamakuzure@gmx.net>
Mon, 17 Jul 2017 15:58:36 +0000
(17:58 +0200)
Fixes #5405.
src/basic/fileio.c
patch
|
blob
|
history
diff --git
a/src/basic/fileio.c
b/src/basic/fileio.c
index eadc8b7ea0f31c880996bdb3a375664a64126702..5cf33b48bb0cbaab5c415767916ca9ab254ef864 100644
(file)
--- 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);
if (!env_name_is_valid(key)) {
log_error("%s:%u: invalid variable name \"%s\", ignoring.", strna(filename), line, key);
+ free(value);
return 0;
}
return 0;
}