From: Joseph Sutton Date: Thu, 10 Aug 2023 21:57:11 +0000 (+1200) Subject: s4:auth: Check return value of talloc_new() X-Git-Tag: tevent-0.16.0~987 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9e2dfa53528d475201df13afe8ab79f3ce4f5fb;p=thirdparty%2Fsamba.git s4:auth: Check return value of talloc_new() Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/auth/system_session.c b/source4/auth/system_session.c index dd9a8797a82..999c0f810a2 100644 --- a/source4/auth/system_session.c +++ b/source4/auth/system_session.c @@ -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),