summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-selfheal.c
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2012-03-19 11:56:20 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-19 05:46:52 -0700
commit028936e2dc544158011eb32ad1629eeed75a42e9 (patch)
tree48313f2206de9ec04738c171f6d3049da8230a86 /xlators/cluster/dht/src/dht-selfheal.c
parentdef3dd7f37150657e1b41a2df8a563a93394a518 (diff)
cluster/dht: Prevent crash in dir xattr selfheal
Change-Id: I2ca4ab2f8e8611e7b2ac9ed2edc2e304727259dc BUG: 804280 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/2970 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-selfheal.c')
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index 514eefa352a..6f6d0267122 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -143,6 +143,11 @@ dht_selfheal_dir_xattr_persubvol (call_frame_t *frame, loc_t *loc,
subvol = layout->list[i].xlator;
this = frame->this;
+ GF_VALIDATE_OR_GOTO ("", this, err);
+ GF_VALIDATE_OR_GOTO (this->name, layout, err);
+ GF_VALIDATE_OR_GOTO (this->name, local, err);
+ GF_VALIDATE_OR_GOTO (this->name, subvol, err);
+
xattr = get_new_dict ();
if (!xattr) {
goto err;