Better support for "non-standard" GSS mechs (fix)
authorNicolas Williams <nico@twosigma.com>
Wed, 22 Apr 2020 00:51:16 +0000 (19:51 -0500)
committerNicolas Williams <nico@twosigma.com>
Wed, 22 Apr 2020 00:51:16 +0000 (19:51 -0500)
lib/gssapi/mech/gss_accept_sec_context.c

index 2189dbe3be131624e621ab37de163cb0246beeac..8a5b5021e7a96877ef5a19a5a927d0d58e2903fd 100644 (file)
@@ -285,9 +285,9 @@ gss_accept_sec_context(OM_uint32 *minor_status,
         }
 
         if (m == NULL) {
+                gss_delete_sec_context(&junk, context_handle, NULL);
                 _gss_mg_log(10, "No mechanism accepted the non-standard initial security context token");
                 *output_token = defective_token_error;
-                free(ctx);
                 return GSS_S_BAD_MECH;
         }