]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:ldap_server: terminate the connection if talloc_reference fails
authorStefan Metzmacher <metze@samba.org>
Fri, 12 May 2017 10:09:38 +0000 (12:09 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 15 Jun 2017 07:13:24 +0000 (09:13 +0200)
talloc_reference will be removed completely in the next commits...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/ldap_server/ldap_bind.c

index 7f14384f3595fa1892b72b2f050a1c883ba5ad8c..25fe528b2c29af660388f38c3ddcdce6dd671567 100644 (file)
@@ -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;
                        }
                }
        }