1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 03:25:31 +03:00

basic/fileio: Fix memory leak if READ_FULL_FILE_SECURE flag is used

The memory leak introduced in #12223 (15f8f02)
This commit is contained in:
Benjamin Robin 2019-04-14 17:21:27 +02:00 committed by Yu Watanabe
parent 967de8face
commit c424bed180

View File

@ -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)