diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-07-15 22:16:43 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-07-15 22:16:43 +0000 |
commit | 5e8589374c930031aaf4735e952691c378a260b8 (patch) | |
tree | 158957edef63bb7cac587a2b4370754b04559bae /sys/net/if_ppp.c | |
parent | a763f70dd81e802e555963fb255d7538e879b607 (diff) |
m_freem() can handle NULL, do not check for this condition beforehands.
ok stsp mpi
Diffstat (limited to 'sys/net/if_ppp.c')
-rw-r--r-- | sys/net/if_ppp.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c index 2128137fa08..969206c8361 100644 --- a/sys/net/if_ppp.c +++ b/sys/net/if_ppp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ppp.c,v 1.86 2015/07/08 07:21:50 mpi Exp $ */ +/* $OpenBSD: if_ppp.c,v 1.87 2015/07/15 22:16:41 deraadt Exp $ */ /* $NetBSD: if_ppp.c,v 1.39 1997/05/17 21:11:59 christos Exp $ */ /* @@ -330,10 +330,9 @@ pppdealloc(struct ppp_softc *sc) sc->sc_npqueue = m->m_nextpkt; m_freem(m); } - if (sc->sc_togo != NULL) { - m_freem(sc->sc_togo); - sc->sc_togo = NULL; - } + m_freem(sc->sc_togo); + sc->sc_togo = NULL; + #ifdef PPP_COMPRESS ppp_ccp_closed(sc); sc->sc_xc_state = NULL; |