From 8954110682922232b8bccfe2b7e734d04ce71b96 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 10 Sep 2008 09:07:55 +0200 Subject: [PATCH] filehash: check for NULL ->file_name in hash lookup Original patch from Shaozhi Shawn Ye , modified by me to continue the lookup and just skip the file instead of returning NULL. Signed-off-by: Jens Axboe --- filehash.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/filehash.c b/filehash.c index a00ac788..dab60fe3 100644 --- a/filehash.c +++ b/filehash.c @@ -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; -- 2.25.1