diff options
| author | martin <martin@NetBSD.org> | 2020-02-25 18:50:29 +0000 |
|---|---|---|
| committer | martin <martin@NetBSD.org> | 2020-02-25 18:50:29 +0000 |
| commit | 4fe859ed17c7b26aa8797cf9434533027ea72fda (patch) | |
| tree | 585e4e0c423c0dece1bbe482e57f266d2262336e /sys/dev | |
| parent | 12e38d5e32a99c4c7bbe54440b9a098ec95ecd30 (diff) | |
Pull up following revision(s) (requested by skrll in ticket #718):
sys/dev/usb/ohci.c: revision 1.296
sys/dev/usb/uhci.c: revision 1.294
sys/external/bsd/dwc2/dwc2.c: revision 1.72
sys/arch/mips/adm5120/dev/ahci.c: revision 1.21
sys/dev/usb/ehci.c: revision 1.274
Fix a memory leak. Spotted by nat@
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/ehci.c | 8 | ||||
| -rw-r--r-- | sys/dev/usb/ohci.c | 6 | ||||
| -rw-r--r-- | sys/dev/usb/uhci.c | 5 |
3 files changed, 12 insertions, 7 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index d3350671d2b..1fffeca68f7 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.267.2.1 2020/02/10 18:50:29 martin Exp $ */ +/* $NetBSD: ehci.c,v 1.267.2.2 2020/02/25 18:50:29 martin Exp $ */ /* * Copyright (c) 2004-2012 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.267.2.1 2020/02/10 18:50:29 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.267.2.2 2020/02/25 18:50:29 martin Exp $"); #include "ohci.h" #include "uhci.h" @@ -3813,7 +3813,7 @@ Static void ehci_device_ctrl_close(struct usbd_pipe *pipe) { ehci_softc_t *sc = EHCI_PIPE2SC(pipe); - /*struct ehci_pipe *epipe = EHCI_PIPE2EPIPE(pipe);*/ + struct ehci_pipe * const epipe = EHCI_PIPE2EPIPE(pipe); EHCIHIST_FUNC(); EHCIHIST_CALLED(); @@ -3822,6 +3822,8 @@ ehci_device_ctrl_close(struct usbd_pipe *pipe) DPRINTF("pipe=%#jx", (uintptr_t)pipe, 0, 0, 0); ehci_close_pipe(pipe, sc->sc_async_head); + + usb_freemem(&sc->sc_bus, &epipe->ctrl.reqdma); } /* diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 79df1ade046..9264329bc42 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.289.4.3 2019/12/14 12:35:58 martin Exp $ */ +/* $NetBSD: ohci.c,v 1.289.4.4 2020/02/25 18:50:29 martin Exp $ */ /* * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.289.4.3 2019/12/14 12:35:58 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.289.4.4 2020/02/25 18:50:29 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -2915,6 +2915,8 @@ ohci_device_ctrl_close(struct usbd_pipe *pipe) DPRINTF("pipe=%#jx", (uintptr_t)pipe, 0, 0, 0); ohci_close_pipe(pipe, sc->sc_ctrl_head); ohci_free_std_locked(sc, opipe->tail.td); + + usb_freemem(&sc->sc_bus, &opipe->ctrl.reqdma); } /************************/ diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 70d8549cf6a..26014a2c714 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.288 2019/02/17 04:17:52 rin Exp $ */ +/* $NetBSD: uhci.c,v 1.288.4.1 2020/02/25 18:50:29 martin Exp $ */ /* * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.288 2019/02/17 04:17:52 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.288.4.1 2020/02/25 18:50:29 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -2848,6 +2848,7 @@ uhci_device_ctrl_close(struct usbd_pipe *pipe) uhci_free_std_locked(sc, upipe->ctrl.setup); uhci_free_std_locked(sc, upipe->ctrl.stat); + usb_freemem(&sc->sc_bus, &upipe->ctrl.reqdma); } /* Abort a device interrupt request. */ |
