From: Erwan Velu Date: Tue, 3 Oct 2017 09:19:57 +0000 (+0200) Subject: backend: Removing memory leak in run_threads() X-Git-Tag: fio-3.2~69 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=6541f4e003fb88567289de929bb4ce0a5d4744bc backend: Removing memory leak in run_threads() The fd structure must be freed before breaking the foreach() unless it leaks its memory This patch add a free() call in the last break statement. Signed-off-by: Jens Axboe --- diff --git a/backend.c b/backend.c index 029d0054..b1995ef4 100644 --- a/backend.c +++ b/backend.c @@ -2346,6 +2346,7 @@ reap: fio_terminate_threads(TERMINATE_ALL); fio_abort = 1; nr_started--; + free(fd); break; } dprint(FD_MUTEX, "done waiting on startup_mutex\n");