diff options
author | shishir gowda <shishirng@gluster.com> | 2010-09-17 04:12:51 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-17 06:23:48 -0700 |
commit | 3d7356c0c205898bd4d515300c563be9ce113ec3 (patch) | |
tree | dc19fbc7df73c974f29b6b354147509171cad417 /xlators/cluster/dht | |
parent | b2693d5e059c99095ceafb9ee8401f65825213c5 (diff) |
Fix crash in dht_pathinfo_getxattr_cbk
The crash happened due to NULL dereferencing.
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1626 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1626
Diffstat (limited to 'xlators/cluster/dht')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 29d35b05528..92ea5854e20 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -1596,12 +1596,19 @@ dht_pathinfo_getxattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (local->pathinfo) strcat (local->pathinfo, " Link: "); + if (local->hashed_subvol) { + /* This will happen if there pending */ + STACK_WIND (frame, dht_pathinfo_getxattr_cbk, local->hashed_subvol, + local->hashed_subvol->fops->getxattr, + &local->loc, local->key); - /* This will happen if there pending */ - STACK_WIND (frame, dht_pathinfo_getxattr_cbk, local->hashed_subvol, - local->hashed_subvol->fops->getxattr, - &local->loc, local->key); + return 0; + } + gf_log ("this->name", GF_LOG_ERROR, "Unable to find hashed_subvol for path" + " %s", local->pathinfo); + + DHT_STACK_UNWIND (getxattr, frame, -1, op_errno, dict); return 0; } |