diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-12 18:48:54 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-07-12 18:48:54 +0000 |
commit | 9355adab6702f4798111e38a2e7e7be541270937 (patch) | |
tree | 1fda49353b276c780d60c7609e331839f2c13505 /sys/dev/usb/uhub.c | |
parent | 48b6cac396e42c57b5037f5a67d6cd7afb1733d6 (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/dev/usb/uhub.c')
-rw-r--r-- | sys/dev/usb/uhub.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index f8427849add..dde6dba4d41 100644 --- a/sys/dev/usb/uhub.c +++ b/sys/dev/usb/uhub.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhub.c,v 1.68 2014/07/09 18:15:04 mpi Exp $ */ +/* $OpenBSD: uhub.c,v 1.69 2014/07/12 18:48:52 tedu Exp $ */ /* $NetBSD: uhub.c,v 1.64 2003/02/08 03:32:51 ichiro Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */ @@ -177,7 +177,7 @@ uhub_attach(struct device *parent, struct device *self, void *aux) hub->ports = malloc(sizeof(struct usbd_port) * nports, M_USBDEV, M_NOWAIT); if (hub->ports == NULL) { - free(hub, M_USBDEV); + free(hub, M_USBDEV, 0); return; } dev->hub = hub; @@ -302,11 +302,11 @@ uhub_attach(struct device *parent, struct device *self, void *aux) bad: if (sc->sc_statusbuf) - free(sc->sc_statusbuf, M_USBDEV); + free(sc->sc_statusbuf, M_USBDEV, 0); if (hub) { if (hub->ports) - free(hub->ports, M_USBDEV); - free(hub, M_USBDEV); + free(hub->ports, M_USBDEV, 0); + free(hub, M_USBDEV, 0); } dev->hub = NULL; } @@ -496,12 +496,12 @@ uhub_detach(struct device *self, int flags) } if (hub->ports[0].tt) - free(hub->ports[0].tt, M_USBDEV); + free(hub->ports[0].tt, M_USBDEV, 0); if (sc->sc_statusbuf) - free(sc->sc_statusbuf, M_USBDEV); + free(sc->sc_statusbuf, M_USBDEV, 0); if (hub->ports) - free(hub->ports, M_USBDEV); - free(hub, M_USBDEV); + free(hub->ports, M_USBDEV, 0); + free(hub, M_USBDEV, 0); sc->sc_hub->hub = NULL; return (0); |