From 67624335f5d2ca9c8b0c7d1630e7186cb5cdd6d6 Mon Sep 17 00:00:00 2001 From: Iraj Jamali Date: Tue, 9 Oct 2018 12:07:11 +0530 Subject: 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 --- xlators/performance/nl-cache/src/nl-cache-helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/performance') 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; } -- cgit