summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2010-06-03 14:51:29 +0000
committertrasz <trasz@FreeBSD.org>2010-06-03 14:51:29 +0000
commit7c23796624ecfbb8f63cd3692eb3effb34095139 (patch)
tree90121987610e41d49c57679fb557c3ccf1dd3368 /lib/libc
parent307713b0cf837122c02128382f81fbe757863cb1 (diff)
downloadFreeBSD-src-7c23796624ecfbb8f63cd3692eb3effb34095139.zip
FreeBSD-src-7c23796624ecfbb8f63cd3692eb3effb34095139.tar.gz
Don't forget to free the string in error case.
Found with: Coverity Prevent CID: 6585
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/posix1e/acl_to_text_nfs4.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/posix1e/acl_to_text_nfs4.c b/lib/libc/posix1e/acl_to_text_nfs4.c
index 5d0aa31..a60a8d3 100644
--- a/lib/libc/posix1e/acl_to_text_nfs4.c
+++ b/lib/libc/posix1e/acl_to_text_nfs4.c
@@ -246,6 +246,7 @@ _nfs4_acl_to_text_np(const acl_t aclp, ssize_t *len_p, int flags)
error = format_entry(str + off, size - off, entry, flags);
if (error) {
+ free(str);
errno = EINVAL;
return (NULL);
}
OpenPOWER on IntegriCloud