diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-10-23 14:27:00 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-10-23 14:52:17 +1100 |
commit | 4ad0397d8afdd6bec609506f3736f8567afe7564 (patch) | |
tree | c46f3b0f8d5b602ca1cb3b0c32b005d181acdbdc /source4/rpc_server | |
parent | 05f93c3e8fe2b0f6e520686742c48c78c96605ab (diff) | |
download | samba-4ad0397d8afdd6bec609506f3736f8567afe7564.tar.gz samba-4ad0397d8afdd6bec609506f3736f8567afe7564.tar.bz2 samba-4ad0397d8afdd6bec609506f3736f8567afe7564.zip |
s4-ldbwrap: added re-use of ldb contexts in ldb_wrap_connect()
This allows us to reuse a ldb context if it is open twice, instead
of going through the expensive process of a full ldb open. We can
reuse it if all of the parameters are the same.
The change relies on callers using talloc_unlink() or free of a parent
to close a ldb context.
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/netlogon/dcerpc_netlogon.c | 4 | ||||
-rw-r--r-- | source4/rpc_server/samr/dcesrv_samr.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index c3cdfb1581..d59cb6fb82 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -256,7 +256,7 @@ static NTSTATUS dcesrv_netr_ServerAuthenticate3(struct dcesrv_call_state *dce_ca } nt_status = schannel_store_session_key_ldb(schannel_ldb, mem_ctx, creds); - talloc_free(schannel_ldb); + talloc_unlink(mem_ctx, schannel_ldb); return nt_status; } @@ -343,7 +343,7 @@ static NTSTATUS dcesrv_netr_creds_server_step_check(struct dcesrv_call_state *dc schannel_in_use, received_authenticator, return_authenticator, creds_out); - talloc_free(ldb); + talloc_unlink(mem_ctx, ldb); return nt_status; } diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index f4ada2c7c7..08f1471665 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -4205,7 +4205,7 @@ static NTSTATUS dcesrv_samr_GetDomPwInfo(struct dcesrv_call_state *dce_call, TAL "pwdProperties", 1); talloc_free(msgs); - talloc_free(sam_ctx); + talloc_unlink(mem_ctx, sam_ctx); return NT_STATUS_OK; } |