From 731209a47e5ac5f2f0e3e840dfbef463dde0c014 Mon Sep 17 00:00:00 2001 From: Anuradha Date: Mon, 25 May 2015 11:07:27 +0530 Subject: 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 Tested-by: Gluster Build System Reviewed-by: Raghavendra G Tested-by: Raghavendra G Signed-off-by: Anuradha Reviewed-on: http://review.gluster.org/11040 --- xlators/features/quota/src/quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/features/quota/src/quota.c') diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index d8bacb7924f..a649df87005 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; } -- cgit