summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2002-08-12 14:32:45 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2002-08-12 14:32:45 +0000
commit5c0d21284ecf3adc579619a2f4fa5a7a1feafa68 (patch)
tree69473d34e8b3afd83613d8c7c634a3805295a071 /sys/kern
parentb057ff80e097117dca402fa7f8fafbb221b28c93 (diff)
Missing FRELE() call on writev(2) error condition; art@ ok.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/sys_generic.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c
index 9c679c23bfc..b5b19ab0b23 100644
--- a/sys/kern/sys_generic.c
+++ b/sys/kern/sys_generic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys_generic.c,v 1.40 2002/08/11 02:20:24 provos Exp $ */
+/* $OpenBSD: sys_generic.c,v 1.41 2002/08/12 14:32:44 aaron Exp $ */
/* $NetBSD: sys_generic.c,v 1.24 1996/03/29 00:25:32 cgd Exp $ */
/*
@@ -427,8 +427,10 @@ dofilewritev(p, fd, fp, iovp, iovcnt, offset, retval)
/* note: can't use iovlen until iovcnt is validated */
iovlen = iovcnt * sizeof(struct iovec);
if ((u_int)iovcnt > UIO_SMALLIOV) {
- if ((u_int)iovcnt > IOV_MAX)
- return (EINVAL);
+ if ((u_int)iovcnt > IOV_MAX) {
+ error = EINVAL;
+ goto out;
+ }
iov = needfree = malloc(iovlen, M_IOV, M_WAITOK);
} else if ((u_int)iovcnt > 0) {
iov = aiov;