diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-09-16 16:59:37 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:18:52 -0500 |
commit | 655b710204e7a7d8e486da7ba675fcbeed116fea (patch) | |
tree | 30a4c72758cd1526ce79a1f1c289c4159dba3578 /source4/rpc_server/winreg | |
parent | d01bbe68424da9fd0c67d2dc383f13a8ede8ac78 (diff) | |
download | samba-655b710204e7a7d8e486da7ba675fcbeed116fea.tar.gz samba-655b710204e7a7d8e486da7ba675fcbeed116fea.tar.bz2 samba-655b710204e7a7d8e486da7ba675fcbeed116fea.zip |
r18584: found one of the fd leaks. The registry backend was using a
talloc(NULL, xxx) to allocate the registry context. That had two
consequences
1) it was a massive memory leak, as all winreg operations leaked their
entire context (including an open ldb database) every time
2) event_context_find() never found the exsting event context, so we
used a new event context each time, which called epoll_create()
each time, which caused a fd to be allocated
(This used to be commit 1c0a3de39828b43149d8981fc7f10e7c8b59a392)
Diffstat (limited to 'source4/rpc_server/winreg')
-rw-r--r-- | source4/rpc_server/winreg/rpc_winreg.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c index adcbb749da..e32f620e5b 100644 --- a/source4/rpc_server/winreg/rpc_winreg.c +++ b/source4/rpc_server/winreg/rpc_winreg.c @@ -32,7 +32,10 @@ enum handle_types { HTYPE_REGVAL, HTYPE_REGKEY }; static NTSTATUS dcerpc_winreg_bind(struct dcesrv_call_state *dce_call, const struct dcesrv_interface *iface) { struct registry_context *ctx; - reg_open_local(&ctx, dce_call->conn->auth_state.session_info, NULL); + WERROR err; + + err = reg_open_local(dce_call->context, + &ctx, dce_call->conn->auth_state.session_info, NULL); dce_call->context->private = ctx; |