diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-12 18:44:44 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-12 18:44:44 +0000 |
commit | 48b6cac396e42c57b5037f5a67d6cd7afb1733d6 (patch) | |
tree | 29d721c60c102e5fb6ed78e8ad45bbda321c951f /sys/net/if_ppp.c | |
parent | a29a93ecbd0d69878182d5959b330ae5badcadc7 (diff) |
add a size argument to free. will be used soon, but for now default to 0.
after discussions with beck deraadt kettenis.
Diffstat (limited to 'sys/net/if_ppp.c')
-rw-r--r-- | sys/net/if_ppp.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c index 5cb44e75ac4..cff0149e64b 100644 --- a/sys/net/if_ppp.c +++ b/sys/net/if_ppp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ppp.c,v 1.74 2014/05/05 11:44:33 mpi Exp $ */ +/* $OpenBSD: if_ppp.c,v 1.75 2014/07/12 18:44:22 tedu Exp $ */ /* $NetBSD: if_ppp.c,v 1.39 1997/05/17 21:11:59 christos Exp $ */ /* @@ -274,7 +274,7 @@ ppp_clone_destroy(struct ifnet *ifp) if_detach(ifp); - free(sc, M_DEVBUF); + free(sc, M_DEVBUF, 0); return (0); } @@ -367,19 +367,19 @@ pppdealloc(struct ppp_softc *sc) #endif /* PPP_COMPRESS */ #if NBPFILTER > 0 if (sc->sc_pass_filt.bf_insns != 0) { - free(sc->sc_pass_filt.bf_insns, M_DEVBUF); + free(sc->sc_pass_filt.bf_insns, M_DEVBUF, 0); sc->sc_pass_filt.bf_insns = 0; sc->sc_pass_filt.bf_len = 0; } if (sc->sc_active_filt.bf_insns != 0) { - free(sc->sc_active_filt.bf_insns, M_DEVBUF); + free(sc->sc_active_filt.bf_insns, M_DEVBUF, 0); sc->sc_active_filt.bf_insns = 0; sc->sc_active_filt.bf_len = 0; } #endif #ifdef VJC if (sc->sc_comp != 0) { - free(sc->sc_comp, M_DEVBUF); + free(sc->sc_comp, M_DEVBUF, 0); sc->sc_comp = 0; } #endif @@ -569,11 +569,11 @@ pppioctl(struct ppp_softc *sc, u_long cmd, caddr_t data, int flag, newcode = malloc(newcodelen, M_DEVBUF, M_WAITOK); if ((error = copyin((caddr_t)nbp->bf_insns, (caddr_t)newcode, newcodelen)) != 0) { - free(newcode, M_DEVBUF); + free(newcode, M_DEVBUF, 0); return error; } if (!bpf_validate(newcode, nbp->bf_len)) { - free(newcode, M_DEVBUF); + free(newcode, M_DEVBUF, 0); return EINVAL; } } else @@ -585,7 +585,7 @@ pppioctl(struct ppp_softc *sc, u_long cmd, caddr_t data, int flag, bp->bf_insns = newcode; splx(s); if (oldcode != 0) - free(oldcode, M_DEVBUF); + free(oldcode, M_DEVBUF, 0); break; #endif |