2N/A/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2N/A/* #ident "@(#)gss_release_oid_set.c 1.12 95/08/23 SMI" */
2N/A
2N/A/*
2N/A * Copyright 1996 by Sun Microsystems, Inc.
2N/A *
2N/A * Permission to use, copy, modify, distribute, and sell this software
2N/A * and its documentation for any purpose is hereby granted without fee,
2N/A * provided that the above copyright notice appears in all copies and
2N/A * that both that copyright notice and this permission notice appear in
2N/A * supporting documentation, and that the name of Sun Microsystems not be used
2N/A * in advertising or publicity pertaining to distribution of the software
2N/A * without specific, written prior permission. Sun Microsystems makes no
2N/A * representations about the suitability of this software for any
2N/A * purpose. It is provided "as is" without express or implied warranty.
2N/A *
2N/A * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
2N/A * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
2N/A * EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
2N/A * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
2N/A * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2N/A * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2N/A * PERFORMANCE OF THIS SOFTWARE.
2N/A */
2N/A
2N/A/*
2N/A * glue routine for gss_release_oid_set
2N/A */
2N/A
2N/A#include "gssapiP_generic.h"
2N/A
2N/A#include <stdio.h>
2N/A#ifdef HAVE_STDLIB_H
2N/A#include <stdlib.h>
2N/A#endif
2N/A
2N/AOM_uint32
2N/Ageneric_gss_release_oid_set(
2N/A OM_uint32 *minor_status,
2N/A gss_OID_set *set)
2N/A{
2N/A size_t i;
2N/A if (minor_status)
2N/A *minor_status = 0;
2N/A
2N/A if (set == NULL)
2N/A return(GSS_S_COMPLETE);
2N/A
2N/A if (*set == GSS_C_NULL_OID_SET)
2N/A return(GSS_S_COMPLETE);
2N/A
2N/A for (i=0; i<(*set)->count; i++)
2N/A free((*set)->elements[i].elements);
2N/A
2N/A free((*set)->elements);
2N/A free(*set);
2N/A
2N/A *set = GSS_C_NULL_OID_SET;
2N/A
2N/A return(GSS_S_COMPLETE);
2N/A}