From d79c7d41da373dea7f95506c178b18f0dd896043 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 25 Sep 2004 11:24:10 +0000 Subject: r2627: use the new talloc capabilities in a bunch more places in the rpc server code. This fixes a number of memory leaks I found when testing with valgrind and smbtorture, as the cascading effect of a talloc_free() ensures that anything derived from the top level object is destroyed on disconnect. (This used to be commit 76d0b8206ce64d6ff4a192979c43dddbec726d6e) --- source4/smb_server/smb_server.c | 3 +-- source4/smb_server/smb_server.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/smb_server') diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c index 35c552c825..8eb799cdb1 100644 --- a/source4/smb_server/smb_server.c +++ b/source4/smb_server/smb_server.c @@ -824,7 +824,6 @@ void smbd_process_async(struct smbsrv_connection *smb_conn) void smbsrv_accept(struct server_connection *conn) { struct smbsrv_connection *smb_conn; - char *socket_addr; int fd; DEBUG(5,("smbsrv_accept\n")); @@ -861,7 +860,7 @@ void smbsrv_accept(struct server_connection *conn) set_blocking(fd, True); /* setup the DCERPC server subsystem */ - dcesrv_init_context(&smb_conn->dcesrv); + dcesrv_init_context(smb_conn, &smb_conn->dcesrv); return; } diff --git a/source4/smb_server/smb_server.h b/source4/smb_server/smb_server.h index b7f9e04385..1f7df36a9b 100644 --- a/source4/smb_server/smb_server.h +++ b/source4/smb_server/smb_server.h @@ -293,7 +293,7 @@ struct smbsrv_connection { struct substitute_context substitute; - struct dcesrv_context dcesrv; + struct dcesrv_context *dcesrv; /* the pid of the process handling this session */ pid_t pid; -- cgit