1206917Smarius/*-
2206917Smarius * Copyright (c) 2008 Isilon Inc http://www.isilon.com/
3206917Smarius * Authors: Doug Rabson <dfr@rabson.org>
4206917Smarius * Developed with Red Inc: Alfred Perlstein <alfred@freebsd.org>
5206917Smarius *
6206917Smarius * Redistribution and use in source and binary forms, with or without
7206917Smarius * modification, are permitted provided that the following conditions
8206917Smarius * are met:
9206917Smarius * 1. Redistributions of source code must retain the above copyright
10206917Smarius *    notice, this list of conditions and the following disclaimer.
11206917Smarius * 2. Redistributions in binary form must reproduce the above copyright
12206917Smarius *    notice, this list of conditions and the following disclaimer in the
13206917Smarius *    documentation and/or other materials provided with the distribution.
14206917Smarius *
15206917Smarius * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16206917Smarius * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17206917Smarius * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18206917Smarius * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19206917Smarius * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20206917Smarius * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21206917Smarius * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22206917Smarius * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23206917Smarius * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24206917Smarius * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25206917Smarius * SUCH DAMAGE.
26206917Smarius */
27206917Smarius
28206917Smarius#include <sys/cdefs.h>
29206917Smarius__FBSDID("$FreeBSD$");
30206917Smarius
31206917Smarius#include <sys/param.h>
32206917Smarius#include <sys/kernel.h>
33206917Smarius#include <sys/kobj.h>
34206917Smarius#include <sys/malloc.h>
35206917Smarius
36206917Smarius#include <kgssapi/gssapi.h>
37206917Smarius#include <kgssapi/gssapi_impl.h>
38206917Smarius
39206917SmariusOM_uint32
40206917Smariusgss_release_oid_set(OM_uint32 *minor_status,
41206917Smarius    gss_OID_set *set)
42206917Smarius{
43206917Smarius
44206917Smarius	*minor_status = 0;
45206917Smarius	if (set && *set) {
46206917Smarius		if ((*set)->elements)
47206917Smarius			free((*set)->elements, M_GSSAPI);
48206917Smarius		free(*set, M_GSSAPI);
49206917Smarius		*set = GSS_C_NO_OID_SET;
50206917Smarius	}
51206917Smarius	return (GSS_S_COMPLETE);
52206917Smarius}
53206917Smarius