From 35a5ef27ba8a8da2b78e6d58a7385d4d443445bd Mon Sep 17 00:00:00 2001
From: Anuradha <atalur@redhat.com>
Date: Mon, 25 May 2015 11:07:27 +0530
Subject: [PATCH 02/18] 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: 1224225
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>
Reviewed-on: http://review.gluster.org/11040
Signed-off-by: Anuradha Talur <atalur@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/49889
Reviewed-by: Sachin Pandit <spandit@redhat.com>
Reviewed-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
Tested-by: Raghavendra Gowdappa <rgowdapp@redhat.com>
---
xlators/features/quota/src/quota.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
1.9.3