projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
967de8f
)
basic/fileio: Fix memory leak if READ_FULL_FILE_SECURE flag is used
author
Benjamin Robin
<dev@benjarobin.fr>
Sun, 14 Apr 2019 15:21:27 +0000
(17:21 +0200)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 15 Apr 2019 04:54:19 +0000
(13:54 +0900)
The memory leak introduced in #12223 (
15f8f02
)
src/basic/fileio.c
patch
|
blob
|
history
diff --git
a/src/basic/fileio.c
b/src/basic/fileio.c
index 2cec054610012001ce19a94e45165a67f1d08778..16034fb9e8a2d08a7813c6728ced5c86afc9ed95 100644
(file)
--- a/
src/basic/fileio.c
+++ b/
src/basic/fileio.c
@@
-359,6
+359,7
@@
int read_full_stream_full(
}
memcpy_safe(t, buf, n);
explicit_bzero_safe(buf, n);
+ buf = mfree(buf);
} else {
t = realloc(buf, n_next + 1);
if (!t)