mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
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.
This commit is contained in:
@ -548,7 +548,7 @@ static NTSTATUS add_socket(struct tevent_context *event_context,
|
||||
|
||||
/* And once we are bound, free the tempoary ldb, it will
|
||||
* connect again on each incoming LDAP connection */
|
||||
talloc_free(ldb);
|
||||
talloc_unlink(ldap_service, ldb);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user