summaryrefslogtreecommitdiff
path: root/filehash.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2008-09-10 09:07:55 +0200
committerJens Axboe <jens.axboe@oracle.com>2008-09-10 09:07:55 +0200
commit8954110682922232b8bccfe2b7e734d04ce71b96 (patch)
treee825c14e2aaac06cfa89bf18ade21b2602a23393 /filehash.c
parentb9fbcf2104ab79127825e0c23ba0a147ec076087 (diff)
downloadfio-8954110682922232b8bccfe2b7e734d04ce71b96.tar.gz
fio-8954110682922232b8bccfe2b7e734d04ce71b96.tar.bz2
filehash: check for NULL ->file_name in hash lookup
Original patch from Shaozhi Shawn Ye <yeshao@google.com>, modified by me to continue the lookup and just skip the file instead of returning NULL. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'filehash.c')
-rw-r--r--filehash.c3
1 files changed, 3 insertions, 0 deletions
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;