From: Björn Baumbach Date: Tue, 4 Sep 2018 12:46:03 +0000 (+0200) Subject: s4-auth: fetch possible out of memory error X-Git-Tag: tdb-1.3.17~1337 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29e757aca23933c52f9420d2cffbe5be17cf585d;p=thirdparty%2Fsamba.git s4-auth: fetch possible out of memory error Signed-off-by: Björn Baumbach Reviewed-by: Volker Lendecke --- diff --git a/source4/auth/system_session.c b/source4/auth/system_session.c index b03a55f2cab..e9cff3d55d6 100644 --- a/source4/auth/system_session.c +++ b/source4/auth/system_session.c @@ -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);