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>
This commit is contained in:
Harpreet Lalwani 2018-10-23 18:23:53 +05:30 committed by Amar Tumballi
parent bf5bfa5f2f
commit c66ea8566d

View File

@ -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;