From e8b8c9f1f406862e01cdfc0852a6d2ca9b308302 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 5 Feb 2007 10:47:48 +0100 Subject: [PATCH] [PATCH] Fix double free in sg engine error path We need to clear td->io_ops->data if we free the structure, otherwise the ->cleanup() handler will try to free it again. Signed-off-by: Jens Axboe --- engines/fio-engine-sg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/fio-engine-sg.c b/engines/fio-engine-sg.c index e0748892..3ea1e289 100644 --- a/engines/fio-engine-sg.c +++ b/engines/fio-engine-sg.c @@ -311,6 +311,7 @@ err: free(sd->events); free(sd->cmds); free(sd); + td->io_ops->data = NULL; return 1; } -- 2.25.1