summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src/posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/locks/src/posix.c')
-rw-r--r--xlators/features/locks/src/posix.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index a6296ba12a9..0e75ad889be 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -3584,11 +3584,11 @@ pl_client_disconnect_cbk (xlator_t *this, client_t *client)
pl_ctx = pl_ctx_get (client, this);
- pl_inodelk_client_cleanup (this, pl_ctx);
-
- pl_entrylk_client_cleanup (this, pl_ctx);
-
- pl_metalk_client_cleanup (this, pl_ctx);
+ if (pl_ctx) {
+ pl_inodelk_client_cleanup (this, pl_ctx);
+ pl_entrylk_client_cleanup (this, pl_ctx);
+ pl_metalk_client_cleanup (this, pl_ctx);
+ }
return 0;
}