diff options
author | Vijay Bellur <vijay@gluster.com> | 2009-12-16 00:48:16 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2009-12-16 09:25:33 -0800 |
commit | b64d55a5b879812ff01f749a609238316031f332 (patch) | |
tree | e4ed75d266f4ee8560c6df8aed7871f7413bd6cf /xlators/cluster/dht/src | |
parent | d049402c7336df73b1af7524f5f06a42069aa6b5 (diff) |
cluster/dht: Check for pointers before de-referencing in dht_stat_merge()
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 463 (Crash in dht_stat_merge ())
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=463
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r-- | xlators/cluster/dht/src/dht-helper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c index 1b49046ce19..9816c1784cd 100644 --- a/xlators/cluster/dht/src/dht-helper.c +++ b/xlators/cluster/dht/src/dht-helper.c @@ -320,6 +320,9 @@ int dht_stat_merge (xlator_t *this, struct stat *to, struct stat *from, xlator_t *subvol) { + if (!from || !to) + return 0; + to->st_dev = from->st_dev; dht_itransform (this, subvol, from->st_ino, &to->st_ino); |