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-15 13:54:19 +09:00
committed by Yu Watanabe
parent 967de8face
commit c424bed180
+1
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)