gss: intern OIDs (#447)
Intern OIDs so that gss_release_oid() can be a NOOP.
This commit is contained in:

committed by
Nico Williams

parent
a8f0905b71
commit
4a93c4774a
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user