1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

auth4: Fix CID 1034877 Resource leak

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Oct  2 14:19:08 UTC 2024 on atb-devel-224
This commit is contained in:
Volker Lendecke 2024-09-30 11:05:20 +02:00
parent fd8d0cba3f
commit dea292c2fd

View File

@ -365,6 +365,7 @@ struct auth_session_info *auth_session_info_from_transport(TALLOC_CTX *mem_ctx,
creds = cli_credentials_init(session_info);
if (!creds) {
gss_release_cred(&minor_status, &cred_handle);
*reason = "Out of memory in cli_credentials_init()";
return NULL;
}
@ -372,6 +373,7 @@ struct auth_session_info *auth_session_info_from_transport(TALLOC_CTX *mem_ctx,
ok = cli_credentials_set_conf(creds, lp_ctx);
if (!ok) {
gss_release_cred(&minor_status, &cred_handle);
*reason = "Failed to load smb.conf";
return NULL;
}
@ -385,6 +387,7 @@ struct auth_session_info *auth_session_info_from_transport(TALLOC_CTX *mem_ctx,
CRED_SPECIFIED,
&error_string);
if (ret) {
gss_release_cred(&minor_status, &cred_handle);
*reason = talloc_asprintf(mem_ctx,
"Failed to set pipe forwarded "
"creds: %s\n", error_string);