summaryrefslogtreecommitdiff
path: root/sys/compat/ultrix
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/ultrix')
-rw-r--r--sys/compat/ultrix/ultrix_misc.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/compat/ultrix/ultrix_misc.c b/sys/compat/ultrix/ultrix_misc.c
index 3dd59b3e51e..2f86fdb9241 100644
--- a/sys/compat/ultrix/ultrix_misc.c
+++ b/sys/compat/ultrix/ultrix_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ultrix_misc.c,v 1.26 2002/03/14 20:31:31 mickey Exp $ */
+/* $OpenBSD: ultrix_misc.c,v 1.27 2002/08/23 01:13:09 pvalchev Exp $ */
/* $NetBSD: ultrix_misc.c,v 1.23 1996/04/07 17:23:04 jonathan Exp $ */
/*
@@ -361,25 +361,24 @@ ultrix_sys_setsockopt(p, v, retval)
m->m_len = sizeof(struct linger);
error = (sosetopt((struct socket *)fp->f_data, SCARG(uap, level),
SO_LINGER, m));
- FRELE(fp);
- return (error);
+ goto bad;
}
if (SCARG(uap, valsize) > MLEN) {
- FRELE(fp);
- return (EINVAL);
+ error = EINVAL;
+ goto bad;
}
if (SCARG(uap, val)) {
m = m_get(M_WAIT, MT_SOOPTS);
if ((error = copyin(SCARG(uap, val), mtod(m, caddr_t),
(u_int)SCARG(uap, valsize))) != 0) {
- FRELE(fp);
(void) m_free(m);
- return (error);
+ goto bad;
}
m->m_len = SCARG(uap, valsize);
}
error = (sosetopt((struct socket *)fp->f_data, SCARG(uap, level),
SCARG(uap, name), m));
+bad:
FRELE(fp);
return (error);
}