From 6658fdde8f6e328e232d9d40067df8ae4b16e8b2 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 4 Oct 2010 22:15:57 +0000 Subject: distribute: check for 'conf' before dereferencing it Signed-off-by: Amar Tumballi Signed-off-by: Vijay Bellur BUG: 1806 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1806 --- xlators/cluster/dht/src/dht.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src/dht.c') diff --git a/xlators/cluster/dht/src/dht.c b/xlators/cluster/dht/src/dht.c index 06623014a86..2c2f1750755 100644 --- a/xlators/cluster/dht/src/dht.c +++ b/xlators/cluster/dht/src/dht.c @@ -208,7 +208,7 @@ fini (xlator_t *this) dht_conf_t *conf = NULL; conf = this->private; - + this->private = NULL; if (conf) { if (conf->file_layouts) { for (i = 0; i < conf->subvolume_cnt; i++) { @@ -262,6 +262,8 @@ reconfigure (xlator_t *this, dict_t *options) conf = this->private; + if (!conf) + return 0; if (dict_get_str (options, "lookup-unhashed", &temp_str) == 0) { /* If option is not "auto", other options _should_ be boolean*/ -- cgit