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/auth/gensec | |
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/auth/gensec')
-rw-r--r-- | source4/auth/gensec/schannel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/auth/gensec/schannel.c b/source4/auth/gensec/schannel.c index 2fe97fede4..58cbb6a593 100644 --- a/source4/auth/gensec/schannel.c +++ b/source4/auth/gensec/schannel.c @@ -146,7 +146,7 @@ static NTSTATUS schannel_update(struct gensec_security *gensec_security, TALLOC_ /* pull the session key for this client */ status = schannel_fetch_session_key_ldb(schannel_ldb, out_mem_ctx, workstation, &creds); - talloc_free(schannel_ldb); + talloc_unlink(out_mem_ctx, schannel_ldb); if (!NT_STATUS_IS_OK(status)) { DEBUG(3, ("Could not find session key for attempted schannel connection from %s: %s\n", workstation, nt_errstr(status))); |