From: Volker Lendecke Date: Thu, 19 Jun 2025 15:44:31 +0000 (+0200) Subject: auth: Direct variable initialization X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5d68404dc0b1031f40d3a9016ccdddc23a95a870;p=thirdparty%2Fsamba.git auth: Direct variable initialization talloc_stackframe() panics on failure Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S Autobuild-User(master): Anoop C S Autobuild-Date(master): Fri Jun 20 11:12:14 UTC 2025 on atb-devel-224 --- diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index c01bab5ed34..b7a81f09c9e 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -1399,17 +1399,10 @@ static NTSTATUS make_new_session_info_guest(TALLOC_CTX *mem_ctx, struct auth_serversupplied_info *server_info = NULL; const char *guest_account = lp_guest_account(); const char *domain = lp_netbios_name(); - struct netr_SamInfo3 info3; - TALLOC_CTX *tmp_ctx; + struct netr_SamInfo3 info3 = {}; + TALLOC_CTX *tmp_ctx = talloc_stackframe(); NTSTATUS status; - tmp_ctx = talloc_stackframe(); - if (tmp_ctx == NULL) { - return NT_STATUS_NO_MEMORY; - } - - ZERO_STRUCT(info3); - status = get_guest_info3(tmp_ctx, &info3); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("get_guest_info3 failed with %s\n",