summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Robin <dev@benjarobin.fr>2019-04-14 17:21:27 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-04-15 06:54:19 +0200
commitc424bed180919cad5ba70081a075639ddc56ba2c (patch)
tree60c4b705cfe60c0eff658769544d774101c79095
parentDocument (final) assignment on the RUN (#12310) (diff)
downloadsystemd-c424bed180919cad5ba70081a075639ddc56ba2c.tar.xz
systemd-c424bed180919cad5ba70081a075639ddc56ba2c.zip
basic/fileio: Fix memory leak if READ_FULL_FILE_SECURE flag is used
The memory leak introduced in #12223 (15f8f02)
-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 2cec054610..16034fb9e8 100644
--- 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)