diff options
author | Vikas Gorur <vikas@gluster.com> | 2009-09-08 05:06:22 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-09-08 04:47:37 -0700 |
commit | b1246773d17fadf93abb54c2fd504b3fc31944a9 (patch) | |
tree | fbf7abf19853dfa36dde10027d916ed1532b1672 /xlators | |
parent | 1eb3fd72b13353fdb93dd0773d9da7aafccdde6b (diff) |
cluster/afr: Check op_ret in afr_getxattr_cbk before accessing dict
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 250 (Crash in replicate getxattr)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=250
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/afr/src/afr-inode-read.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c index 2f9a6cda9fd..2032065119a 100644 --- a/xlators/cluster/afr/src/afr-inode-read.c +++ b/xlators/cluster/afr/src/afr-inode-read.c @@ -642,7 +642,8 @@ afr_getxattr_cbk (call_frame_t *frame, void *cookie, out: if (unwind) { - __filter_xattrs (dict); + if (op_ret >= 0 && dict) + __filter_xattrs (dict); AFR_STACK_UNWIND (frame, op_ret, op_errno, dict); } |