brcmfmac: Fix memory leak in brcmf_usbdev_qinit
PATCH 1/1 brcmfmac: Fix memory leak in brcmf_usbdev_qinit
In the implementation of brcmf_usbdev_qinit() the allocated memory for reqs is leaking if usb_alloc_urb() fails. Release reqs in the error handling path.
Fixes 71bb244ba2fd ("brcm80211: fmac: add USB support for bcm43235/6/8 chipsets")
Signed-off-by Navid Emamdoost <[email protected]>
--- drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c +1 -0
@@ -430,6 +430,7 @@ brcmf_usbdev_qinit(struct list_head *q, int qsize)usb_free_urb (req->urb);list_del (q->next); } +kfree (reqs);return NULL ; }
Signature · 1 line
2.17.1
Quoted 6 lines · Navid Emamdoost
In the implementation of
brcmf_usbdev_qinit()the allocated memory for reqs is leaking ifusb_alloc_urb()fails. Release reqs in the error handling path.Fixes 71bb244ba2fd ("brcm80211: fmac: add USB support for bcm43235/6/8 chipsets")Signed-off-by Navid Emamdoost <[email protected]>
Patch applied to wireless-drivers-next.git, thanks.
4282dc057d75 brcmfmac: Fix memory leak in brcmf_usbdev_qinit
Signature · 3 lines
https://patchwork.kernel.org/patch/11292553/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches