From: Stefan Metzmacher Date: Fri, 26 Jan 2024 17:07:53 +0000 (+0100) Subject: s4:libcli/ldap: fix no memory error code in ldap_bind_sasl() X-Git-Tag: tdb-1.4.11~993 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8deba427e2697501f10e80a2ac0325a657635b92;p=thirdparty%2Fsamba.git 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 Reviewed-by: Andrew Bartlett --- diff --git a/source4/libcli/ldap/ldap_bind.c b/source4/libcli/ldap/ldap_bind.c index 1f7308211b1..51231a615c4 100644 --- a/source4/libcli/ldap/ldap_bind.c +++ b/source4/libcli/ldap/ldap_bind.c @@ -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) {