diff --git a/lib/gssapi/mech/gss_mech_switch.c b/lib/gssapi/mech/gss_mech_switch.c index 282569a82..5b5da0442 100644 --- a/lib/gssapi/mech/gss_mech_switch.c +++ b/lib/gssapi/mech/gss_mech_switch.c @@ -173,6 +173,10 @@ add_builtin(gssapi_mech_interface mech) struct _gss_mech_switch *m; OM_uint32 minor_status; + /* not registering any mech is ok */ + if (mech == NULL) + return 0; + m = malloc(sizeof(*m)); if (m == NULL) return 1;