Fix out-of-band deref of (potentially) gone threads structure
authorJens Axboe <jens.axboe@oracle.com>
Mon, 26 May 2008 14:38:28 +0000 (16:38 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 26 May 2008 14:38:28 +0000 (16:38 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.c

diff --git a/fio.c b/fio.c
index c17ea3c3ae8822ba68f8f705c4ce13812d5052a3..37a425e85ee6fde71ec7aa537b0f6947687cc128 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -101,6 +101,9 @@ static void terminate_threads(int group_id)
 
 static void sig_handler(int sig)
 {
+       if (!threads)
+               return;
+
        switch (sig) {
        case SIGALRM:
                update_io_ticks();