summaryrefslogtreecommitdiffstats
path: root/lib/libc/posix1e/acl_free.c
diff options
context:
space:
mode:
authorjedgar <jedgar@FreeBSD.org>2001-04-24 22:45:41 +0000
committerjedgar <jedgar@FreeBSD.org>2001-04-24 22:45:41 +0000
commit2da23531d99e45f34811fd6982a681112de0e182 (patch)
tree0b8830fcccafadf6607f3658e96733124ef8617d /lib/libc/posix1e/acl_free.c
parentecbf3eacd9a17a3a9b238e2fa65b2d33d85e8d1f (diff)
downloadFreeBSD-src-2da23531d99e45f34811fd6982a681112de0e182.zip
FreeBSD-src-2da23531d99e45f34811fd6982a681112de0e182.tar.gz
o Separate acl_t into internal and external representations as
required by POSIX.1e. This maintains the current 'struct acl' in the kernel while providing the generic external acl_t interface required to complete the ACL editing library. o Add the acl_get_entry() function. o Convert the existing ACL utilities, getfacl and setfacl, to fully make use of the ACL editing library. Obtained from: TrustedBSD Project
Diffstat (limited to 'lib/libc/posix1e/acl_free.c')
-rw-r--r--lib/libc/posix1e/acl_free.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libc/posix1e/acl_free.c b/lib/libc/posix1e/acl_free.c
index 9dd9ee9..b4aeb1ab 100644
--- a/lib/libc/posix1e/acl_free.c
+++ b/lib/libc/posix1e/acl_free.c
@@ -36,10 +36,18 @@
#include <sys/errno.h>
#include <stdlib.h>
+/*
+ * acl_free() (23.4.12): free any releasable memory allocated to the
+ * ACL data object identified by obj_p.
+ */
int
acl_free(void *obj_p)
{
- free(obj_p);
+ if (obj_p) {
+ free(obj_p);
+ obj_p = NULL;
+ }
+
return (0);
}
OpenPOWER on IntegriCloud