summaryrefslogtreecommitdiffstats
path: root/xlators/features/quota
diff options
context:
space:
mode:
authorAnuradha <atalur@redhat.com>2015-05-25 11:07:27 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-06-03 04:02:43 -0700
commit731209a47e5ac5f2f0e3e840dfbef463dde0c014 (patch)
treead521a47e05bf661f0bd2aaea9a77eca4d28d34f /xlators/features/quota
parent4a43df9de4bda19234cb30937228c745ba3c4684 (diff)
features/quota : Do unwind if postbuf is NULL
If postbuf in quota_writev_cbk is NULL directly an unwind should be done. Trying to dereference it will lead to a crash. Change-Id: Idba6ce3cd1bbf37ede96c7f17d01007d6c07057a BUG: 1227235 Reviewed-on: http://review.gluster.org/10898 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com> Signed-off-by: Anuradha <atalur@redhat.com> Reviewed-on: http://review.gluster.org/11040
Diffstat (limited to 'xlators/features/quota')
-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 d8bacb7..a649df8 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -1500,7 +1500,7 @@ quota_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
local = frame->local;
- if ((op_ret < 0) || (local == NULL)) {
+ if ((op_ret < 0) || (local == NULL) || (postbuf == NULL)) {
goto out;
}