summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorIraj Jamali <ijamali@redhat.com>2018-10-09 12:07:11 +0530
committerAmar Tumballi <amarts@redhat.com>2018-10-12 05:40:59 +0000
commit67624335f5d2ca9c8b0c7d1630e7186cb5cdd6d6 (patch)
tree563fbc599ca36e1920b866f140a64a9eff02b3a0 /xlators
parent16704e575cfece60ed3d4ad413aaefabcae0474b (diff)
performance/nl-cache: clang fix
Argument with 'nonnull' attribute passed null. Adding a check to avoid the issue. Updates: bz#1622665 Change-Id: I1d3a166e154a51da59bebb93a49f5174e593c98e Signed-off-by: Iraj Jamali <ijamali@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/performance/nl-cache/src/nl-cache-helper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/performance/nl-cache/src/nl-cache-helper.c b/xlators/performance/nl-cache/src/nl-cache-helper.c
index 063172019b1..f2954a83228 100644
--- a/xlators/performance/nl-cache/src/nl-cache-helper.c
+++ b/xlators/performance/nl-cache/src/nl-cache-helper.c
@@ -243,6 +243,8 @@ nlc_init_invalid_ctx(xlator_t *this, inode_t *inode, nlc_ctx_t *nlc_ctx)
int ret = -1;
conf = this->private;
+ if (!nlc_ctx)
+ goto out;
LOCK(&nlc_ctx->lock);
{
@@ -283,7 +285,7 @@ nlc_init_invalid_ctx(xlator_t *this, inode_t *inode, nlc_ctx_t *nlc_ctx)
}
unlock:
UNLOCK(&nlc_ctx->lock);
-
+out:
return;
}