summaryrefslogtreecommitdiffstats
path: root/lib/libc/posix1e/acl_from_text.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-01-09 05:45:03 +0000
committerrwatson <rwatson@FreeBSD.org>2001-01-09 05:45:03 +0000
commit0a3118c2475e3bd9524360c7422d43988fc761a1 (patch)
treef58d6adb33d18446b701928092d020e4461aef2a /lib/libc/posix1e/acl_from_text.c
parenta80aac3d997b53c0312b44faad038b2b9eed16f4 (diff)
downloadFreeBSD-src-0a3118c2475e3bd9524360c7422d43988fc761a1.zip
FreeBSD-src-0a3118c2475e3bd9524360c7422d43988fc761a1.tar.gz
o acl_from_text.c:
- errno is already set to ENOMEM (as appropriate) when asprintf(), strdup(), or acl_init() fails o acl_to_text.c: - the return value of the initial strdup() is not checked - errno is already set to ENOMEM (as appropriate) when asprintf and acl_init() fails - let the the default: case use 'goto error_label' for consistency Submitted by: jedgar
Diffstat (limited to 'lib/libc/posix1e/acl_from_text.c')
-rw-r--r--lib/libc/posix1e/acl_from_text.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libc/posix1e/acl_from_text.c b/lib/libc/posix1e/acl_from_text.c
index 72e2f96..d4d9986 100644
--- a/lib/libc/posix1e/acl_from_text.c
+++ b/lib/libc/posix1e/acl_from_text.c
@@ -117,15 +117,12 @@ acl_from_text(const char *buf_p)
/* Local copy we can mess up. */
mybuf_p = strdup(buf_p);
- if (!mybuf_p) {
- errno = ENOMEM;
+ if (!mybuf_p)
return(0);
- }
acl = acl_init(3);
if (!acl) {
free(mybuf_p);
- errno = ENOMEM;
return(0);
}
OpenPOWER on IntegriCloud