Fix bug #7020 - smbd using 2G memory.
[samba.git] / source3 / smbd / pipes.c
index bf64c59afdaab9486df4d31eedcaecc92ab4b8d5..9bc3fdfdf6d46ae3797b219c8a7c4da90236ad25 100644 (file)
@@ -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);
 }