summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2016-01-06 13:34:01 +0000
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-01-21 01:48:14 -0800
commit30ef018c00b0d1be5d590c9518c159a7946d040e (patch)
treed30e065ec9a4d2484855d3af938c2b78add38f8e /xlators/cluster/afr
parent27a350fe30c03fddb57231a2a60bb3e4c54d9dd4 (diff)
afr : Check if dict is valid in afr_replies_interpret()
posix_mkdir does not send response xdata. So even though replies are valid, the response xdata dict is NULL. Check if dict is non-null in afr_replies_interpret before doing dict_get Signed-off-by: Ravishankar N <ravishankar@redhat.com> Change-Id: If543d68d8bfd2433519105839d5be106076cc276 BUG: 1294053 Reviewed-on: http://review.gluster.org/13185 Tested-by: Ravishankar N <ravishankar@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/afr')
-rw-r--r--xlators/cluster/afr/src/afr-common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 9be3670d380..27403eaa58b 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -701,7 +701,8 @@ afr_replies_interpret (call_frame_t *frame, xlator_t *this, inode_t *inode)
continue;
}
- if (dict_get (replies[i].xdata, GLUSTERFS_BAD_INODE)) {
+ if (replies[i].xdata &&
+ dict_get (replies[i].xdata, GLUSTERFS_BAD_INODE)) {
data_readable[i] = 0;
metadata_readable[i] = 0;
continue;