diff options
author | Amar Tumballi <amar@gluster.com> | 2010-10-04 22:15:57 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-10-05 02:48:14 -0700 |
commit | 6658fdde8f6e328e232d9d40067df8ae4b16e8b2 (patch) | |
tree | 20159c078f04c9aa5886685883d81aa30cea43f1 /xlators/cluster/dht/src/dht.c | |
parent | 372ed08f25da2eb7e09f27685cb1773b88c62173 (diff) |
distribute: check for 'conf' before dereferencing it
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1806 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1806
Diffstat (limited to 'xlators/cluster/dht/src/dht.c')
-rw-r--r-- | xlators/cluster/dht/src/dht.c | 4 |
1 files changed, 3 insertions, 1 deletions
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*/ |