summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2012-04-14 08:47:28 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2012-04-14 08:47:28 +0000
commit9e701c7b6deb4196d1a9eef6a939c6d2b73b2028 (patch)
tree6a263a83449c7fd08b507049f95c9ca6c2eba58d /sys
parent39016485a7467e1fdc62b4e77c8cecba061ecdf4 (diff)
Revert rev 1.58, as it frees an uninitialized pointer
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/uipc_usrreq.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 76f0ceeca42..7f3bcbf0ca7 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_usrreq.c,v 1.61 2012/04/13 19:22:18 deraadt Exp $ */
+/* $OpenBSD: uipc_usrreq.c,v 1.62 2012/04/14 08:47:27 guenther Exp $ */
/* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */
/*
@@ -642,10 +642,8 @@ unp_externalize(struct mbuf *rights, socklen_t controllen)
controllen = 0;
else
controllen -= CMSG_ALIGN(sizeof(struct cmsghdr));
- if (nfds > controllen / sizeof(int)) {
- error = EMSGSIZE;
- goto restart;
- }
+ if (nfds > controllen / sizeof(int))
+ return (EMSGSIZE);
rp = (struct file **)CMSG_DATA(cm);