mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
auth:credentials: Fix resource leak in cli_credentials_set_from_ccache()
Reported by Red Hat internal covscan leaked_storage: Variable "princ" going out of scope leaks the storage it points to. Signed-off-by: Pavel Filipenský <pfilipensky@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
256471299a
commit
3ef5162dcd
@ -261,6 +261,7 @@ static int cli_credentials_set_from_ccache(struct cli_credentials *cred,
|
||||
(*error_string) = talloc_asprintf(cred, "failed to unparse principal from ccache: %s\n",
|
||||
smb_get_krb5_error_message(ccache->smb_krb5_context->krb5_context,
|
||||
ret, cred));
|
||||
krb5_free_principal(ccache->smb_krb5_context->krb5_context, princ);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user