smbd: Fix bug 9549 -- Memleak in the async echo handler
authorVolker Lendecke <vl@samba.org>
Tue, 8 Jan 2013 14:34:19 +0000 (15:34 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 8 Jan 2013 22:30:41 +0000 (23:30 +0100)
Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jan  8 23:30:41 CET 2013 on sn-devel-104

source3/smbd/process.c

index f89ca02aeaeebc318f63d5aa24f378a59771734f..a02aeda85252d815426dc6637183b7b55cba6eb2 100644 (file)
@@ -3022,7 +3022,7 @@ static void smbd_echo_got_packet(struct tevent_req *req)
                }
 
                iov = &state->pending[num_pending];
-               iov->iov_base = buf;
+               iov->iov_base = talloc_move(state->pending, &buf);
                iov->iov_len = buflen;
 
                DEBUG(10,("echo_handler[%d]: forward to main\n",