summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2011-04-12 09:20:53 +0000
committerAnand Avati <avati@gluster.com>2011-04-12 21:50:21 -0700
commit5ca2445270b4b77f2399a9f6332083ff933234a1 (patch)
treefd867835487947b2ef83972720bee6cc8eee6dcb /xlators/features
parent470bef24d742165a6499128f0b7a8748bdc8be96 (diff)
features/quota: check for proper return value in case failure of dict_get_bin
Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2723 ([glusterfs-3.2.0qa11]: glusterfs client crashed in quota_validate_cbk) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2723
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/quota/src/quota.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index a94d5b72987..6f28c8981c2 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -234,7 +234,7 @@ quota_validate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
ret = dict_get_bin (dict, QUOTA_SIZE_KEY, (void **) &size);
- if (ret == -1) {
+ if (ret < 0) {
gf_log (this->name, GF_LOG_WARNING,
"size key not present in dict");
op_errno = EINVAL;