diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-09-20 10:24:30 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-09-20 14:26:09 +0200 |
commit | ebd150366f0852e7ebd32e7743e6a135138320a0 (patch) | |
tree | 30371d71ac127b6885e9d0149be4fa1559966fcd /test/unit | |
parent | 752a9ec4b44198554b9f998ed6e4a837878fc49f (diff) | |
download | lvm2-ebd150366f0852e7ebd32e7743e6a135138320a0.tar.gz |
cov: add explicit NULL pointer check
Make obvious to coverity strcmp() is not getting NULL pointer.
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/run.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unit/run.c b/test/unit/run.c index 206857159..281991c51 100644 --- a/test/unit/run.c +++ b/test/unit/run.c @@ -240,7 +240,7 @@ static unsigned _filter(const char *pattern, struct test_details **tests, unsign } for (i = 0; i < nr; i++) - if (!regexec(&rx, tests[i]->path, 0, NULL, 0)) + if (tests[i] && !regexec(&rx, tests[i]->path, 0, NULL, 0)) tests[found++] = tests[i]; regfree(&rx); |