diff options
author | Peter Valchev <pvalchev@cvs.openbsd.org> | 2002-08-23 01:13:10 +0000 |
---|---|---|
committer | Peter Valchev <pvalchev@cvs.openbsd.org> | 2002-08-23 01:13:10 +0000 |
commit | aa5287bbf32c33d0ba2329ad1e640e84326707c3 (patch) | |
tree | 8eec06d0c4a0c8a487c3409473ad18c6cb8295dc /sys/compat/ultrix/ultrix_misc.c | |
parent | 7b3f8875a9bad5d14096d23a856098592ed51505 (diff) |
FREF/FRELE cleanup/simplification, no functional changes; ok art
Diffstat (limited to 'sys/compat/ultrix/ultrix_misc.c')
-rw-r--r-- | sys/compat/ultrix/ultrix_misc.c | 13 |
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); } |