diff options
author | rwatson <rwatson@FreeBSD.org> | 2001-01-09 05:45:03 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2001-01-09 05:45:03 +0000 |
commit | 0a3118c2475e3bd9524360c7422d43988fc761a1 (patch) | |
tree | f58d6adb33d18446b701928092d020e4461aef2a /lib/libposix1e/acl_from_text.c | |
parent | a80aac3d997b53c0312b44faad038b2b9eed16f4 (diff) | |
download | FreeBSD-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/libposix1e/acl_from_text.c')
-rw-r--r-- | lib/libposix1e/acl_from_text.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libposix1e/acl_from_text.c b/lib/libposix1e/acl_from_text.c index 72e2f96..d4d9986 100644 --- a/lib/libposix1e/acl_from_text.c +++ b/lib/libposix1e/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); } |