1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

s4:libcli/ldap: fix no memory error code in ldap_bind_sasl()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15621

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2024-01-26 18:07:53 +01:00 committed by Andrew Bartlett
parent 2435ab1ad7
commit 8deba427e2

View File

@ -264,7 +264,10 @@ _PUBLIC_ NTSTATUS ldap_bind_sasl(struct ldap_connection *conn,
}
tmp_ctx = talloc_new(conn);
if (tmp_ctx == NULL) goto failed;
if (tmp_ctx == NULL) {
status = NT_STATUS_NO_MEMORY;
goto failed;
}
search = &sasl_mechs_msgs[0]->r.SearchResultEntry;
if (search->num_attributes != 1) {