summaryrefslogtreecommitdiffstats
path: root/xlators/storage
diff options
context:
space:
mode:
authorHarpreet Lalwani <hlalwani@redhat.com>2018-10-23 18:23:53 +0530
committerAmar Tumballi <amarts@redhat.com>2018-10-26 02:56:07 +0000
commitc66ea8566d18230ce20b55640b25a06f6f56ec7d (patch)
treef5cd03063e0f05c89fb8d818dcf14dd987afff2d /xlators/storage
parentbf5bfa5f2fcd1a73078c289aeac715bd82c366ed (diff)
posix: Null pointer dereferencing clang fix
Added a check for "top" Updates: bz#1622665 Change-Id: I354fdc7150b2f1eb452702ddb653e2d6ed609c10 Signed-off-by: Harpreet Lalwani <hlalwani@redhat.com>
Diffstat (limited to 'xlators/storage')
-rw-r--r--xlators/storage/posix/src/posix-helpers.c2
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 be0bd06f0b0..fcd4b3ccf3f 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -2062,7 +2062,7 @@ abort:
if (ret == 0)
kill(getpid(), SIGKILL);
- } else {
+ } else if (top) {
LOCK(&ctx->volfile_lock);
for (trav_p = &top->children; *trav_p; trav_p = &(*trav_p)->next) {
victim = (*trav_p)->xlator;