mirror of
https://github.com/systemd/systemd.git
synced 2025-03-28 02:50:16 +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:
parent
967de8face
commit
c424bed180
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user