]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix defcred leak in krb5 gss_inquire_cred()
authorGreg Hudson <ghudson@mit.edu>
Wed, 21 Jul 2021 17:43:39 +0000 (13:43 -0400)
committerGreg Hudson <ghudson@mit.edu>
Wed, 21 Jul 2021 17:43:39 +0000 (13:43 -0400)
commit098f874f3b50dd2c46c0a574677324b5f6f3a1a8
treec4e9ded1a2255471cf3047bb439e5c5b44ee6647
parentd8c95fe992fe7e0d9314a28364fc26992f1da628
Fix defcred leak in krb5 gss_inquire_cred()

Commit 1cd2821c19b2b95e39d5fc2f451a035585a40fa5 altered the memory
management of krb5_gss_inquire_cred(), introducing defcred to act as
an owner pointer when the function must acquire a default credential.
The commit neglected to update the code to release the default cred
along the successful path.  The old code does not trigger because
cred_handle is now reassigned, so the default credential is leaked.

Reported by Pavel Březina.

(a minimal alternative to commit 593e16448e1af23eef74689afe06a7bcc86e79c7)

ticket: 9016
version_fixed: 1.19.2
src/lib/gssapi/krb5/inq_cred.c