Fix getsockopt(IP_ACCT_*) to not panic kernel

Submitted by: Bill Fenner <fenner@parc.xerox.com>
This commit is contained in:
Andrey A. Chernov 1995-05-12 20:00:21 +00:00
parent 4769e93ea2
commit 2f632e8fe8

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)raw_ip.c 8.2 (Berkeley) 1/4/94
* $Id: raw_ip.c,v 1.16 1995/03/16 16:25:43 wollman Exp $
* $Id: raw_ip.c,v 1.17 1995/04/09 01:29:23 davidg Exp $
*/
#include <sys/param.h>
@ -268,8 +268,7 @@ rip_ctloutput(op, so, level, optname, m)
return(EINVAL);
}
op = PRCO_SETOPT;
if (op) {
if (op == PRCO_SETOPT) {
error=(*ip_acct_ctl_ptr)(optname, *m);
if (*m)
(void)m_free(*m);