156055Srwatson/*-
274191Srwatson * Copyright (c) 1999, 2000, 2001 Robert N. M. Watson
356055Srwatson * All rights reserved.
456055Srwatson *
556055Srwatson * Redistribution and use in source and binary forms, with or without
656055Srwatson * modification, are permitted provided that the following conditions
756055Srwatson * are met:
856055Srwatson * 1. Redistributions of source code must retain the above copyright
956055Srwatson *    notice, this list of conditions and the following disclaimer.
1056055Srwatson * 2. Redistributions in binary form must reproduce the above copyright
1156055Srwatson *    notice, this list of conditions and the following disclaimer in the
1256055Srwatson *    documentation and/or other materials provided with the distribution.
1356055Srwatson *
1456055Srwatson * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1556055Srwatson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1656055Srwatson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1756055Srwatson * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1856055Srwatson * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1956055Srwatson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2056055Srwatson * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2156055Srwatson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2256055Srwatson * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2356055Srwatson * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2456055Srwatson * SUCH DAMAGE.
2556055Srwatson */
2656055Srwatson/*
2756055Srwatson * acl_free -- free ACL objects from user memory
2856055Srwatson */
2956055Srwatson
3092986Sobrien#include <sys/cdefs.h>
3192986Sobrien__FBSDID("$FreeBSD$");
3292986Sobrien
3356055Srwatson#include <sys/types.h>
3475185Stmm#include "namespace.h"
3556055Srwatson#include <sys/acl.h>
3675185Stmm#include "un-namespace.h"
3756055Srwatson#include <sys/errno.h>
3856055Srwatson#include <stdlib.h>
3956055Srwatson
4075928Sjedgar/*
4175928Sjedgar * acl_free() (23.4.12): free any releasable memory allocated to the
4275928Sjedgar * ACL data object identified by obj_p.
4375928Sjedgar */
4456055Srwatsonint
4556055Srwatsonacl_free(void *obj_p)
4656055Srwatson{
4756055Srwatson
4875928Sjedgar	if (obj_p) {
4975928Sjedgar		free(obj_p);
5075928Sjedgar		obj_p = NULL;
5175928Sjedgar	}
5275928Sjedgar
5356055Srwatson	return (0);
5456055Srwatson}
55