summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src
diff options
context:
space:
mode:
authorarao <arao@redhat.com>2015-02-17 15:14:53 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2015-04-23 09:46:26 -0700
commit272b55b54b3f760f0b95b29ec37ed719852ce4ed (patch)
treecba17fe5d45cb9379766dac126b9b81e5b8b24f8 /xlators/cluster/dht/src
parent0fc310accb6bf86e42e09e0876b51b8860075fda (diff)
dht: Fixing dereference after null check
CID: 1175023 The check for null is made before dereferencing the pointer variable alongside. Change-Id: I827927f2fcf6d1f365f4d6b5a678373020b9daf9 BUG: 789278 Signed-off-by: arao <arao@redhat.com> Reviewed-on: http://review.gluster.org/9663 Tested-by: NetBSD Build System Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r--xlators/cluster/dht/src/dht-shared.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-shared.c b/xlators/cluster/dht/src/dht-shared.c
index fc281b80287..042adf1714b 100644
--- a/xlators/cluster/dht/src/dht-shared.c
+++ b/xlators/cluster/dht/src/dht-shared.c
@@ -135,7 +135,7 @@ dht_priv_dump (xlator_t *this)
gf_proc_dump_write("refresh_interval", "%d", conf->refresh_interval);
gf_proc_dump_write("unhashed_sticky_bit", "%d", conf->unhashed_sticky_bit);
- if (conf->du_stats) {
+ if (conf->du_stats && conf->subvolume_status) {
for (i = 0; i < conf->subvolume_cnt; i++) {
if (!conf->subvolume_status[i])
continue;