From 5de8074b3917e46cf68762c1b52775e5533a90cb Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 12 May 2017 12:09:38 +0200 Subject: [PATCH] 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 --- source4/ldap_server/ldap_bind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } } -- 2.47.2