diff options
Diffstat (limited to 'source4/ldap_server')
-rw-r--r-- | source4/ldap_server/ldap_bind.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c index 105e64078f..fd7deda499 100644 --- a/source4/ldap_server/ldap_bind.c +++ b/source4/ldap_server/ldap_bind.c @@ -68,8 +68,7 @@ static NTSTATUS ldapsrv_BindSimple(struct ldapsrv_call *call) errstr = NULL; talloc_unlink(call->conn, call->conn->session_info); - call->conn->session_info = session_info; - talloc_steal(call->conn, session_info); + call->conn->session_info = talloc_steal(call->conn, session_info); /* don't leak the old LDB */ talloc_unlink(call->conn, call->conn->ldb); @@ -277,7 +276,7 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call) old_session_info = conn->session_info; conn->session_info = NULL; - status = gensec_session_info(conn->gensec, &conn->session_info); + status = gensec_session_info(conn->gensec, conn, &conn->session_info); if (!NT_STATUS_IS_OK(status)) { conn->session_info = old_session_info; result = LDAP_OPERATIONS_ERROR; @@ -286,7 +285,6 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call) req->creds.SASL.mechanism, nt_errstr(status)); } else { talloc_unlink(conn, old_session_info); - talloc_steal(conn, conn->session_info); /* don't leak the old LDB */ talloc_unlink(conn, conn->ldb); |