summaryrefslogtreecommitdiffstats
path: root/xlators/performance/nl-cache/src/nl-cache-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance/nl-cache/src/nl-cache-helper.c')
-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;
}