4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 1996,1997, by Sun Microsystems, Inc.
24 * All rights reserved.
27 #pragma ident "%Z%%M% %I% %E% SMI"
30 * glue routine for gss_release_name
33 #include "mechglueP.h"
36 gss_release_name(OM_uint32
*minor_status
, gss_name_t
*input_name
)
38 gss_union_name_t union_name
;
40 /* if input_name is NULL, return error */
43 return (GSS_S_BAD_NAME
);
46 * free up the space for the external_name, name_type
47 * and then free the union_name descriptor
49 union_name
= (gss_union_name_t
) *input_name
;
53 if (union_name
== NULL
)
54 return (GSS_S_BAD_NAME
);
56 FREE(union_name
->external_name
->value
,
57 union_name
->external_name
->length
);
58 FREE(union_name
->external_name
, sizeof (gss_buffer_desc
));
60 /* free the name_type */
61 FREE(union_name
->name_type
->elements
, union_name
->name_type
->length
);
62 FREE(union_name
->name_type
, sizeof (gss_OID_desc
));
64 FREE(union_name
, sizeof (gss_union_name_desc
));
66 return (GSS_S_COMPLETE
);