bostic@OKEEFFE.BERKELEY.EDU (Keith Bostic) (06/22/87)
Subject: freeing NULL mbuf pointers Index: sys/netinet/{ip_output.c,raw_ip.c,tcp_usrreq.c} 4.3BSD Description: The routines ip_ctloutput(), rip_ctloutput(), and tcp_ctloutput() can all attempt to free NULL mbuf pointers. Fix: Apply the following patches to the appropriate files. *** ip_output.c.old Sun Jun 21 15:18:53 1987 --- ip_output.c.new Sun Jun 21 15:16:07 1987 *************** *** 346,352 **** } break; } ! if (op == PRCO_SETOPT) (void)m_free(*m); return (error); } --- 346,352 ---- } break; } ! if (op == PRCO_SETOPT && *m) (void)m_free(*m); return (error); } *** raw_ip.c.old Sun Jun 21 15:14:18 1987 --- raw_ip.c.new Sun Jun 21 15:18:29 1987 *************** *** 146,152 **** } break; } ! if (op == PRCO_SETOPT) (void)m_free(*m); return (error); } --- 146,152 ---- } break; } ! if (op == PRCO_SETOPT && *m) (void)m_free(*m); return (error); } *** tcp_usrreq.c.old Sun Jun 21 15:30:17 1987 --- tcp_usrreq.c.new Sun Jun 21 15:30:46 1987 *************** *** 344,350 **** error = EINVAL; break; } ! (void)m_free(m); break; case PRCO_GETOPT: --- 344,351 ---- error = EINVAL; break; } ! if (m) ! (void)m_free(m); break; case PRCO_GETOPT: