From 68bc3c88fc37befe9ef73c8c7f5a2620c94ff4ce Mon Sep 17 00:00:00 2001 From: Susant Palai Date: Tue, 5 May 2015 18:11:52 +0530 Subject: dht/rebalance: Go to exit if defrag is NULL Problem: In case a defrag is null, going to out section will crash rebalance. Change-Id: I8b3ee1ad85dc23ef0e2f2dd6f912d07216bd619f Signed-off-by: Susant Palai Reviewed-on: http://review.gluster.org/10582 Tested-by: Gluster Build System Reviewed-by: N Balachandran --- xlators/cluster/dht/src/dht-rebalance.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'xlators') diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 09cfe515b49..e97e3916fd7 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -2477,19 +2477,19 @@ gf_defrag_start_crawl (void *data) this = data; if (!this) - goto out; + goto exit; ctx = this->ctx; if (!ctx) - goto out; + goto exit; conf = this->private; if (!conf) - goto out; + goto exit; defrag = conf->defrag; if (!defrag) - goto out; + goto exit; gettimeofday (&defrag->start_time, NULL); dht_build_root_inode (this, &defrag->root_inode); @@ -2688,7 +2688,7 @@ out: if (dict) dict_unref(dict); - +exit: return ret; } -- cgit