gss: Fix leak in gss_add_cred_from()

This commit is contained in:
Nicolas Williams
2019-12-06 22:05:21 -06:00
parent 7102f2be9e
commit d021710efc

View File

@@ -188,15 +188,6 @@ gss_add_cred_from(OM_uint32 *minor_status,
goto done; goto done;
} }
new_mc = calloc(1, sizeof(struct _gss_mechanism_cred));
if (new_mc == NULL) {
*minor_status = ENOMEM;
major_status = GSS_S_FAILURE;
goto done;
}
new_mc->gmc_mech = m;
new_mc->gmc_mech_oid = &m->gm_mech_oid;
major_status = _gss_mg_add_mech_cred(minor_status, m, NULL, mn, cred_usage, major_status = _gss_mg_add_mech_cred(minor_status, m, NULL, mn, cred_usage,
initiator_time_req, acceptor_time_req, initiator_time_req, acceptor_time_req,
cred_store, &new_mc, cred_store, &new_mc,