From 6175cb10cd5f59f3c7ae4100bc78f359b68ca3e9 Mon Sep 17 00:00:00 2001 From: Raghavendra Gowdappa Date: Tue, 19 Feb 2019 08:04:52 +0530 Subject: performance/write-behind: handle call-stub leaks Change-Id: I7be9a5f48dcad1b136c479c58b1dca1e0488166d Signed-off-by: Raghavendra Gowdappa Fixes: bz#1674406 --- xlators/performance/write-behind/src/write-behind.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xlators/performance') diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index befcb508e2f..cf302bdccc1 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -1932,6 +1932,9 @@ wb_readv(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, unwind: STACK_UNWIND_STRICT(readv, frame, -1, ENOMEM, NULL, 0, NULL, NULL, NULL); + + if (stub) + call_stub_destroy(stub); return 0; noqueue: @@ -2014,6 +2017,9 @@ wb_flush(call_frame_t *frame, xlator_t *this, fd_t *fd, dict_t *xdata) unwind: STACK_UNWIND_STRICT(flush, frame, -1, ENOMEM, NULL); + if (stub) + call_stub_destroy(stub); + return 0; noqueue: @@ -2057,6 +2063,8 @@ wb_fsync(call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t datasync, unwind: STACK_UNWIND_STRICT(fsync, frame, -1, op_errno, NULL, NULL, NULL); + if (stub) + call_stub_destroy(stub); return 0; noqueue: -- cgit