summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-08-31 06:29:36 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-08-31 06:29:36 +0000
commit8d5850fb7ef5697e8aef5cdcee8284ee4393f97d (patch)
tree49ee4a59450bb87ab0c4b1035bc38a5256d4edd4
parent0c89ba16ab51d07a007afcf01341fa42e8bcd6e2 (diff)
mbuf leak repair; mycroft@netbsd
-rw-r--r--sys/kern/uipc_socket.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 1ac388494d8..3b86c9b985c 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket.c,v 1.15 1997/06/29 18:14:35 deraadt Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.16 1997/08/31 06:29:35 deraadt Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
@@ -355,8 +355,10 @@ sosend(so, addr, uio, top, control, flags)
* of space and resid. On the other hand, a negative resid
* causes us to loop sending 0-length segments to the protocol.
*/
- if (resid < 0)
- return (EINVAL);
+ if (resid < 0) {
+ error = EINVAL;
+ goto out;
+ }
dontroute =
(flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0 &&
(so->so_proto->pr_flags & PR_ATOMIC);