summaryrefslogtreecommitdiff
path: root/source4/ldap_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ldap_server')
-rw-r--r--source4/ldap_server/ldap_bind.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c
index 5341b9f741..35b6ad5fbf 100644
--- a/source4/ldap_server/ldap_bind.c
+++ b/source4/ldap_server/ldap_bind.c
@@ -60,6 +60,7 @@ static NTSTATUS ldapsrv_BindSimple(struct ldapsrv_call *call)
talloc_free(call->conn->session_info);
call->conn->session_info = session_info;
+ talloc_steal(call->conn, session_info);
/* don't leak the old LDB */
talloc_free(call->conn->ldb);
@@ -187,6 +188,7 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call)
errstr = talloc_asprintf(reply, "SASL:[%s]: Failed to get session info: %s", req->creds.SASL.mechanism, nt_errstr(status));
} else {
talloc_free(old_session_info);
+ talloc_steal(conn, conn->session_info);
/* don't leak the old LDB */
talloc_free(conn->ldb);