filehash: check for NULL ->file_name in hash lookup
[fio.git] / filehash.c
index a00ac7885721c60b839f0b6c26144f6355b065a9..dab60fe32e88d0e45e729335c0027c8cdb9e2317 100644 (file)
@@ -39,6 +39,9 @@ static struct fio_file *__lookup_file_hash(const char *name)
        flist_for_each(n, bucket) {
                struct fio_file *f = flist_entry(n, struct fio_file, hash_list);
 
+               if (!f->file_name)
+                       continue;
+
                if (!strcmp(f->file_name, name)) {
                        assert(f->fd != -1);
                        return f;