diff options
author | shishir gowda <shishirng@gluster.com> | 2012-03-19 11:56:20 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-03-19 05:46:52 -0700 |
commit | 028936e2dc544158011eb32ad1629eeed75a42e9 (patch) | |
tree | 48313f2206de9ec04738c171f6d3049da8230a86 | |
parent | def3dd7f37150657e1b41a2df8a563a93394a518 (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>
-rw-r--r-- | xlators/cluster/dht/src/dht-selfheal.c | 5 |
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 514eefa35..6f6d02671 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; |