From f6bd654a6c878111f0f0f4d07adb644fc3bbf224 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 5 Jan 2010 14:34:00 -0800 Subject: [PATCH] Fix bug #7020 - smbd using 2G memory. When deferring an async pipe writeX and readX transfer the outstanding request struct onto the conn struct. This needs freeing after the packet is finally processed. Jeremy. --- source3/smbd/pipes.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c index bf64c59afda..9bc3fdfdf6d 100644 --- a/source3/smbd/pipes.c +++ b/source3/smbd/pipes.c @@ -353,6 +353,11 @@ static void pipe_write_andx_done(struct tevent_req *subreq) done: chain_reply(req); + /* + * We must free here as the ownership of req was + * moved to the connection struct in reply_pipe_write_and_X(). + */ + TALLOC_FREE(req); } /**************************************************************************** @@ -458,4 +463,9 @@ static void pipe_read_andx_done(struct tevent_req *subreq) done: chain_reply(req); + /* + * We must free here as the ownership of req was + * moved to the connection struct in reply_pipe_read_and_X(). + */ + TALLOC_FREE(req); } -- 2.34.1