plug leak in previous commit
[mech_eap.orig] / init_sec_context.c
index a7d17b5..1f445bc 100644 (file)
@@ -952,10 +952,8 @@ gss_init_sec_context(OM_uint32 *minor,
     if (initialContextToken) {
         major = initBegin(minor, cred, ctx, target_name, mech_type,
                           req_flags, time_req, input_chan_bindings);
-        if (GSS_ERROR(major)) {
-            gssEapReleaseContext(minor, &ctx);
-            return major;
-        }
+        if (GSS_ERROR(major))
+            goto cleanup;
     }
 
     major = gssEapSmStep(minor,