summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshish Pandey <aspandey@redhat.com>2017-11-04 19:48:48 +0530
committerJeff Darcy <jeff@pl.atyp.us>2017-11-08 02:13:37 +0000
commit8df155bf0ff10574adbf06cc9383916a1ff4c932 (patch)
treef6784c735480e8f88fb1dac8c103c94ec76e4108
parent6c8e6d0e97342dd2881d7a3f3d03aaaad44502f2 (diff)
cluster/dht: Check for NULL local before using it
Coverity ID: 261 Coverity ID: 257 Check if local is NULL or not Change-Id: I570f87f32e1347f891c6a02ee5641fcc5a262a96 BUG: 789278 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index faf5ddb8aa3..78d8b6a5f6c 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -233,7 +233,9 @@ unlock:
return 0;
err:
- local->refresh_layout_unlock (frame, this, -1, 1);
+ if (local) {
+ local->refresh_layout_unlock (frame, this, -1, 1);
+ }
return 0;
}
@@ -309,7 +311,9 @@ dht_refresh_layout (call_frame_t *frame)
return 0;
out:
- local->refresh_layout_unlock (frame, this, -1, 1);
+ if (local) {
+ local->refresh_layout_unlock (frame, this, -1, 1);
+ }
return 0;
}