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_pppoe.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_pppoe.c')
-rw-r--r-- | sys/net/if_pppoe.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sys/net/if_pppoe.c b/sys/net/if_pppoe.c index da5341d5256..efa97fe3d85 100644 --- a/sys/net/if_pppoe.c +++ b/sys/net/if_pppoe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppoe.c,v 1.39 2014/06/07 11:04:14 henning Exp $ */ +/* $OpenBSD: if_pppoe.c,v 1.40 2014/07/12 18:44:22 tedu Exp $ */ /* $NetBSD: if_pppoe.c,v 1.51 2003/11/28 08:56:48 keihan Exp $ */ /* @@ -280,15 +280,15 @@ pppoe_clone_destroy(struct ifnet *ifp) if_detach(ifp); if (sc->sc_concentrator_name) - free(sc->sc_concentrator_name, M_DEVBUF); + free(sc->sc_concentrator_name, M_DEVBUF, 0); if (sc->sc_service_name) - free(sc->sc_service_name, M_DEVBUF); + free(sc->sc_service_name, M_DEVBUF, 0); if (sc->sc_ac_cookie) - free(sc->sc_ac_cookie, M_DEVBUF); + free(sc->sc_ac_cookie, M_DEVBUF, 0); if (sc->sc_relay_sid) - free(sc->sc_relay_sid, M_DEVBUF); + free(sc->sc_relay_sid, M_DEVBUF, 0); - free(sc, M_DEVBUF); + free(sc, M_DEVBUF, 0); return (0); } @@ -600,7 +600,7 @@ breakbreak: } if (hunique) { if (sc->sc_hunique) - free(sc->sc_hunique, M_DEVBUF); + free(sc->sc_hunique, M_DEVBUF, 0); sc->sc_hunique = malloc(hunique_len, M_DEVBUF, M_DONTWAIT); if (sc->sc_hunique == NULL) @@ -642,7 +642,7 @@ breakbreak: } if (hunique) { if (sc->sc_hunique) - free(sc->sc_hunique, M_DEVBUF); + free(sc->sc_hunique, M_DEVBUF, 0); sc->sc_hunique = malloc(hunique_len, M_DEVBUF, M_DONTWAIT); if (sc->sc_hunique == NULL) @@ -674,7 +674,7 @@ breakbreak: } if (ac_cookie) { if (sc->sc_ac_cookie) - free(sc->sc_ac_cookie, M_DEVBUF); + free(sc->sc_ac_cookie, M_DEVBUF, 0); sc->sc_ac_cookie = malloc(ac_cookie_len, M_DEVBUF, M_DONTWAIT); if (sc->sc_ac_cookie == NULL) @@ -684,7 +684,7 @@ breakbreak: } if (relay_sid) { if (sc->sc_relay_sid) - free(sc->sc_relay_sid, M_DEVBUF); + free(sc->sc_relay_sid, M_DEVBUF, 0); sc->sc_relay_sid = malloc(relay_sid_len, M_DEVBUF, M_DONTWAIT); if (sc->sc_relay_sid == NULL) @@ -737,11 +737,11 @@ breakbreak: sc->sc_state = PPPOE_STATE_INITIAL; memcpy(&sc->sc_dest, etherbroadcastaddr, sizeof(sc->sc_dest)); if (sc->sc_ac_cookie) { - free(sc->sc_ac_cookie, M_DEVBUF); + free(sc->sc_ac_cookie, M_DEVBUF, 0); sc->sc_ac_cookie = NULL; } if (sc->sc_relay_sid) { - free(sc->sc_relay_sid, M_DEVBUF); + free(sc->sc_relay_sid, M_DEVBUF, 0); sc->sc_relay_sid = NULL; } sc->sc_ac_cookie_len = 0; @@ -938,7 +938,7 @@ pppoe_ioctl(struct ifnet *ifp, unsigned long cmd, caddr_t data) } if (sc->sc_concentrator_name) - free(sc->sc_concentrator_name, M_DEVBUF); + free(sc->sc_concentrator_name, M_DEVBUF, 0); sc->sc_concentrator_name = NULL; len = strlen(parms->ac_name); @@ -951,7 +951,7 @@ pppoe_ioctl(struct ifnet *ifp, unsigned long cmd, caddr_t data) } if (sc->sc_service_name) - free(sc->sc_service_name, M_DEVBUF); + free(sc->sc_service_name, M_DEVBUF, 0); sc->sc_service_name = NULL; len = strlen(parms->service_name); @@ -1263,18 +1263,18 @@ pppoe_disconnect(struct pppoe_softc *sc) sc->sc_state = PPPOE_STATE_INITIAL; memcpy(&sc->sc_dest, etherbroadcastaddr, sizeof(sc->sc_dest)); if (sc->sc_ac_cookie) { - free(sc->sc_ac_cookie, M_DEVBUF); + free(sc->sc_ac_cookie, M_DEVBUF, 0); sc->sc_ac_cookie = NULL; } sc->sc_ac_cookie_len = 0; if (sc->sc_relay_sid) { - free(sc->sc_relay_sid, M_DEVBUF); + free(sc->sc_relay_sid, M_DEVBUF, 0); sc->sc_relay_sid = NULL; } sc->sc_relay_sid_len = 0; #ifdef PPPOE_SERVER if (sc->sc_hunique) { - free(sc->sc_hunique, M_DEVBUF); + free(sc->sc_hunique, M_DEVBUF, 0); sc->sc_hunique = NULL; } sc->sc_hunique_len = 0; |