From bae16c498599d4bf1dddca03bf56fa53c73d251a Mon Sep 17 00:00:00 2001 From: Shwetha Acharya Date: Sat, 28 Jul 2018 18:54:47 +0530 Subject: 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 --- xlators/storage/posix/src/posix-helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators') 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) -- cgit