s4-auth: fetch possible out of memory error
authorBjörn Baumbach <bb@sernet.de>
Tue, 4 Sep 2018 12:46:03 +0000 (14:46 +0200)
committerBjörn Baumbach <bb@sernet.de>
Thu, 11 Oct 2018 08:28:18 +0000 (10:28 +0200)
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Volker Lendecke <vl@samba.org>
source4/auth/system_session.c

index b03a55f2cab287831b7343b259ecb2e8d30fabd3..e9cff3d55d6e8466b057ab59d0b381f0047d7459 100644 (file)
@@ -76,7 +76,12 @@ NTSTATUS auth_system_session_info(TALLOC_CTX *parent_ctx,
        NTSTATUS nt_status;
        struct auth_user_info_dc *user_info_dc = NULL;
        struct auth_session_info *session_info = NULL;
-       TALLOC_CTX *mem_ctx = talloc_new(parent_ctx);
+       TALLOC_CTX *mem_ctx = NULL;
+
+       mem_ctx = talloc_new(parent_ctx);
+       if (mem_ctx == NULL) {
+               return NT_STATUS_NO_MEMORY;
+       }
        
        nt_status = auth_system_user_info_dc(mem_ctx, lpcfg_netbios_name(lp_ctx),
                                            &user_info_dc);