summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Gowdappa <rgowdapp@redhat.com>2019-02-19 08:04:52 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2019-02-22 14:49:13 +0000
commitceee95dbc3c80d52134ceaee22e17c9f1c861300 (patch)
tree025df912796f6c8a040f14755e2921e2c37519ff
parentf6c8b1771f71bec287437dbec2e3b2e4f5692ef6 (diff)
performance/write-behind: handle call-stub leaks
Change-Id: I7be9a5f48dcad1b136c479c58b1dca1e0488166d Signed-off-by: Raghavendra Gowdappa <rgowdapp@redhat.com> Fixes: bz#1671556 (cherry picked from commit 6175cb10cd5f59f3c7ae4100bc78f359b68ca3e9)
-rw-r--r--xlators/performance/write-behind/src/write-behind.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
index 62974db93de..7e4bb6a3c83 100644
--- a/xlators/performance/write-behind/src/write-behind.c
+++ b/xlators/performance/write-behind/src/write-behind.c
@@ -1931,6 +1931,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:
@@ -2013,6 +2016,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:
@@ -2056,6 +2062,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: