]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:auth: Check return value of talloc_new()
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 10 Aug 2023 21:57:11 +0000 (09:57 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 14 Aug 2023 04:57:34 +0000 (04:57 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/auth/system_session.c

index dd9a8797a826fac16d91064e7677d117f6f23eb3..999c0f810a201c19a521ea212ca4dda57f92f369 100644 (file)
@@ -411,6 +411,10 @@ _PUBLIC_ NTSTATUS auth_anonymous_session_info(TALLOC_CTX *parent_ctx,
        struct auth_session_info *session_info = NULL;
        TALLOC_CTX *mem_ctx = talloc_new(parent_ctx);
        bool ok;
+
+       if (mem_ctx == NULL) {
+               return NT_STATUS_NO_MEMORY;
+       }
        
        nt_status = auth_anonymous_user_info_dc(mem_ctx,
                                               lpcfg_netbios_name(lp_ctx),