From b3bf2cfaa8e932f02a10a42e0281290a7cbdc960 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Sat, 5 Jul 2014 21:19:01 +0530 Subject: performance/quick-read: Check for iobuf and iobref before unref. In the absence of this check, iobuf_unref() can cause a log flood for read operations. Change-Id: Ib8beef6e55b69ecfb566bf61a96215ef0d0d74dc BUG: 1116514 Signed-off-by: Vijay Bellur Reviewed-on: http://review.gluster.org/8242 Tested-by: Gluster Build System Reviewed-by: Humble Devassy Chirammal Reviewed-by: Prashanth Pai Reviewed-by: Kaleb KEITHLEY --- xlators/performance/quick-read/src/quick-read.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c index 55c5afcf877..bd3921d9b19 100644 --- a/xlators/performance/quick-read/src/quick-read.c +++ b/xlators/performance/quick-read/src/quick-read.c @@ -584,9 +584,11 @@ unlock: STACK_UNWIND_STRICT (readv, frame, op_ret, 0, &iov, 1, &buf, iobref, xdata); } - iobuf_unref (iobuf); + if (iobuf) + iobuf_unref (iobuf); - iobref_unref (iobref); + if (iobref) + iobref_unref (iobref); return op_ret; } -- cgit