diff options
author | Shwetha Acharya <shwetha174@gmail.com> | 2018-07-28 18:54:47 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-08-17 07:32:51 +0000 |
commit | bae16c498599d4bf1dddca03bf56fa53c73d251a (patch) | |
tree | 1b2afd3be982b3e573bddc9c4b8de1d87539444d /xlators/storage | |
parent | 1909f2ca01efcd467164a2d7ed684cdc6e1437de (diff) |
posix: FORWARD_NULL coverity fix
Problem:
filler could be null.
Solution:
Modified the condition check to avoid NULL pointer dereferencing.
BUG: 789278
Change-Id: I0c3e29ede3c226295a9860ddcb3b432832c381dd
Signed-off-by: Shwetha Acharya <shwetha174@gmail.com>
Diffstat (limited to 'xlators/storage')
-rw-r--r-- | xlators/storage/posix/src/posix-helpers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index f4165cc1111..11265bb802b 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -836,7 +836,7 @@ _get_list_xattr (posix_xattr_filler_t *filler) { ssize_t size = 0; - if ((!filler) && (!filler->real_path) && (filler->fdnum < 0)) + if ((!filler) || ((!filler->real_path) && (filler->fdnum < 0))) goto out; if (filler->real_path) |