From: Stefan Metzmacher Date: Fri, 12 May 2017 10:09:38 +0000 (+0200) Subject: s4:ldap_server: terminate the connection if talloc_reference fails X-Git-Tag: ldb-1.1.31~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5de8074b3917e46cf68762c1b52775e5533a90cb;p=thirdparty%2Fsamba.git s4:ldap_server: terminate the connection if talloc_reference fails talloc_reference will be removed completely in the next commits... Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- diff --git a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c index 7f14384f359..25fe528b2c2 100644 --- a/source4/ldap_server/ldap_bind.c +++ b/source4/ldap_server/ldap_bind.c @@ -500,7 +500,7 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call) &context->sasl); if (NT_STATUS_IS_OK(status)) { if (!talloc_reference(context->sasl, conn->gensec)) { - status = NT_STATUS_NO_MEMORY; + return NT_STATUS_NO_MEMORY; } } }