From fcfd2b973cdb9d798861bca1d30a4a42b819b73f Mon Sep 17 00:00:00 2001 From: Poornima Date: Thu, 30 Jan 2014 05:36:42 +0000 Subject: performance/io-cache: Fix for the bugs reported by coverity Change-Id: I24c10d874511a2f24dda2fb84d31f5074da1616f BUG: 789278 Signed-off-by: Poornima Reviewed-on: http://review.gluster.org/6869 Reviewed-by: Raghavendra G Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/performance/io-cache/src/page.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xlators') diff --git a/xlators/performance/io-cache/src/page.c b/xlators/performance/io-cache/src/page.c index 94b8f229b..a21b31816 100644 --- a/xlators/performance/io-cache/src/page.c +++ b/xlators/performance/io-cache/src/page.c @@ -315,6 +315,7 @@ __ioc_wait_on_page (ioc_page_t *page, call_frame_t *frame, off_t offset, local->op_errno = ENOMEM; gf_log (frame->this->name, GF_LOG_WARNING, "asked to wait on a NULL page"); + goto out; } waitq = GF_CALLOC (1, sizeof (*waitq), gf_ioc_mt_ioc_waitq_t); @@ -476,6 +477,7 @@ ioc_fault_cbk (call_frame_t *frame, void *cookie, xlator_t *this, iobref_unref (page->iobref); GF_FREE (page->vector); page->vector = NULL; + page->iobref = NULL; } /* keep a copy of the page for our cache */ -- cgit