From c424bed180919cad5ba70081a075639ddc56ba2c Mon Sep 17 00:00:00 2001 From: Benjamin Robin Date: Sun, 14 Apr 2019 17:21:27 +0200 Subject: basic/fileio: Fix memory leak if READ_FULL_FILE_SECURE flag is used The memory leak introduced in #12223 (15f8f02) --- src/basic/fileio.c | 1 + 1 file changed, 1 insertion(+) 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) -- cgit v1.2.3