From 6541f4e003fb88567289de929bb4ce0a5d4744bc Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Tue, 3 Oct 2017 11:19:57 +0200 Subject: [PATCH] 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 --- backend.c | 1 + 1 file changed, 1 insertion(+) 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"); -- 2.25.1