From 01124530e1b699a2972487cb6330f75b641f90d2 Mon Sep 17 00:00:00 2001 From: "Jose A. Rivera" Date: Thu, 17 Dec 2015 08:19:22 -0600 Subject: [PATCH] vfs_glusterfs: Fix a memory leak in AIO Signed-off-by: Jose A. Rivera --- source3/modules/vfs_glusterfs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index e0cf719..f32f598 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -577,18 +577,14 @@ static void aio_tevent_fd_done(struct tevent_context *event_ctx, DEBUG(0,("\nRead from pipe failed (%s)", strerror(errno))); } - if (state->cancelled) { - return; - } - - req = state->req; - /* if we've cancelled the op, there is no req, so just clean up. */ if (state->cancelled == true) { TALLOC_FREE(state); return; } + req = state->req; + if (req) { tevent_req_done(req); } -- 2.4.3