]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix memory leak in SPNEGO gss_init_sec_context()
authorGreg Hudson <ghudson@mit.edu>
Wed, 25 Nov 2015 19:43:35 +0000 (14:43 -0500)
committerTom Yu <tlyu@mit.edu>
Fri, 15 Jan 2016 22:05:35 +0000 (17:05 -0500)
commitfd0eb62f85e1f57d07aec72bec73a90f5032b60b
treed39e6273272ef561680970a51f65fb5f3b18d570
parent92ffd801940822c680c4719dc22ca3be29820688
Fix memory leak in SPNEGO gss_init_sec_context()

After the initial call to spnego_gss_init_sec_context(), the context
handle can leak if init_ctx_cont() returns an error, because the
cleanup handler assumes that spnego_ctx contains the value of
*context_handle.  Fix this leak by setting spnego_ctx before the if
block which contains that call.  Reported by Adam Bernstein.

(cherry picked from commit 159dbbd5ff14fdc2fa71fb3a8804eb401c914399)

ticket: 8281
version_fixed: 1.13.4
tags: -pullup
status: resolved
src/lib/gssapi/spnego/spnego_mech.c