gss: intern OIDs (#447)

Intern OIDs so that gss_release_oid() can be a NOOP.
This commit is contained in:
Luke Howard
2018-12-18 16:02:05 +11:00
committed by Nico Williams
parent a8f0905b71
commit 4a93c4774a
28 changed files with 232 additions and 80 deletions

View File

@@ -37,22 +37,10 @@
GSSAPI_LIB_FUNCTION OM_uint32 GSSAPI_LIB_CALL
gss_release_oid(OM_uint32 *minor_status, gss_OID *oid)
{
gss_OID o = *oid;
*oid = GSS_C_NO_OID;
if (minor_status != NULL)
*minor_status = 0;
if (o == GSS_C_NO_OID)
return GSS_S_COMPLETE;
if (o->elements != NULL) {
free(o->elements);
o->elements = NULL;
}
o->length = 0;
free(o);
return GSS_S_COMPLETE;
}