Fix an unlikely memory leak in r25591
authorGreg Hudson <ghudson@mit.edu>
Tue, 27 Dec 2011 06:39:07 +0000 (06:39 +0000)
committerGreg Hudson <ghudson@mit.edu>
Tue, 27 Dec 2011 06:39:07 +0000 (06:39 +0000)
ticket: 6936

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25604 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/spnego/spnego_mech.c

index dfb9bada48691e269edc1a8ea447cec304c3f5b4..70246b6acb866a36c8a3debf7390ef5a39a98611 100644 (file)
@@ -589,7 +589,7 @@ init_ctx_new(OM_uint32 *minor_status,
        ret = get_negotiable_mechs(minor_status, spcred, GSS_C_INITIATE,
                                   &sc->mech_set);
        if (ret != GSS_S_COMPLETE)
-               return ret;
+               goto cleanup;
 
        /* Set an initial internal mech to make the first context token. */
        sc->internal_mech = &sc->mech_set->elements[0];