Fixed mbuf lossage when level != IPPROTO_IP. Problem reported by Robert

Dobbs, hint from Charles Hannum, fix by me.
This commit is contained in:
David Greenman 1995-01-12 10:53:25 +00:00
parent c8a5d5e0b0
commit aedcdea1de

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)raw_ip.c 8.2 (Berkeley) 1/4/94
* $Id: raw_ip.c,v 1.9 1994/12/12 17:20:55 ugen Exp $
* $Id: raw_ip.c,v 1.10 1994/12/13 15:57:34 ugen Exp $
*/
#include <sys/param.h>
@ -188,8 +188,11 @@ rip_ctloutput(op, so, level, optname, m)
register struct inpcb *inp = sotoinpcb(so);
register int error;
if (level != IPPROTO_IP)
if (level != IPPROTO_IP) {
if (op == PRCO_SETOPT && *m)
(void)m_free(*m);
return (EINVAL);
}
switch (optname) {