From: Jens Axboe Date: Mon, 5 Feb 2007 09:47:48 +0000 (+0100) Subject: [PATCH] Fix double free in sg engine error path X-Git-Tag: fio-1.12~141 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=e8b8c9f1f406862e01cdfc0852a6d2ca9b308302;p=fio.git [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 --- 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; }