s4:ldap_server: drop the connection if we fail to allocate ldapsrv_sasl_postprocess_c...
authorStefan Metzmacher <metze@samba.org>
Thu, 11 May 2017 19:17:40 +0000 (21:17 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 15 Jun 2017 07:13:23 +0000 (09:13 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/ldap_server/ldap_bind.c

index 451f9d5b56b64503cdc91145b4cc56d8c4d0f154..64ee1b3ba22c8189d0495d0de0a93bc2a266b3fc 100644 (file)
@@ -442,9 +442,8 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call)
            gensec_have_feature(conn->gensec, GENSEC_FEATURE_SEAL)) {
 
                context = talloc(call, struct ldapsrv_sasl_postprocess_context);
-
-               if (!context) {
-                       status = NT_STATUS_NO_MEMORY;
+               if (context == NULL) {
+                       return NT_STATUS_NO_MEMORY;
                }
        }