Fix out-of-band deref of (potentially) gone threads structure
[fio.git] / 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();