
closed: usbd_open_pipe_intr() allocates a usbd_xfer_handle for pipe->intrxfer. Most usb device drivers using interrupt pipes call usbd_abort_pipe() then usbd_close_pipe(), usbd_close_pipe() is supposed to free pipe->intrxfer. But usbd_abort_pipe() calls [uoe]hci_device_intr_abort() which, if the xfer aborted is pipe's intrxfer, sets pipe->intrxfer to NULL. So usbd_close_pipe() can't free it and the usbd_xfer_handle is lost. To fix this, in usbd_abort_pipe() remember the pipe->intrxfer's value on entrie, and if it's different after usbd_ar_pipe(), call usbd_free_xfer with the original value. Confirmed to fix the memory leak on close() with umodem(4) and uplcom(4).
…
…
…
…
…
…
…
…
…
…
Description
No description provided
Languages
C
85.3%
Roff
7.2%
Assembly
3.1%
Shell
1.7%
Makefile
1.2%
Other
0.9%