Fix segfault with client/server and minimal output
authorJens Axboe <axboe@fb.com>
Fri, 16 Jan 2015 21:25:47 +0000 (14:25 -0700)
committerJens Axboe <axboe@fb.com>
Fri, 16 Jan 2015 21:25:47 +0000 (14:25 -0700)
Fixes: bf2921f02651
Reported-by: Ben England <bengland@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
diskutil.c

index 98ae2fe..52d87f6 100644 (file)
@@ -694,6 +694,9 @@ void show_disk_util(int terse, struct json_object *parent)
        struct flist_head *entry;
        struct disk_util *du;
 
+       if (!disk_util_mutex)
+               return;
+
        fio_mutex_down(disk_util_mutex);
 
        if (flist_empty(&disk_list)) {