From f3a340694fcb195aa8b546578c348b41fb2208d1 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: 1221577 Signed-off-by: Anuradha 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 --- xlators/features/quota/src/quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/features/quota/src') diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index ba5e27bd235..6d05273026a 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -1502,7 +1502,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