* [PATCH] brcmfmac: Fix memory leak in brcmf_usbdev_qinit
@ 2019-12-15 1:51 Navid Emamdoost
2019-12-18 19:08 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Navid Emamdoost @ 2019-12-15 1:51 UTC (permalink / raw)
To: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin,
Wright Feng, Kalle Valo, David S. Miller, Alwin Beukers,
Pieter-Paul Giesberts, Kan Yan, Franky (Zhenhui) Lin,
Piotr Figiel, Rafał Miłecki, YueHaibing, Kangjie Lu,
linux-wireless, brcm80211-dev-list.pdl, brcm80211-dev-list,
netdev, linux-kernel
Cc: emamd001, Navid Emamdoost
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 <navid.emamdoost@gmail.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
index 06f3c01f10b3..237c6b491b88 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
@@ -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;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] brcmfmac: Fix memory leak in brcmf_usbdev_qinit
2019-12-15 1:51 [PATCH] brcmfmac: Fix memory leak in brcmf_usbdev_qinit Navid Emamdoost
@ 2019-12-18 19:08 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-12-18 19:08 UTC (permalink / raw)
To: Navid Emamdoost
Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin,
Wright Feng, David S. Miller, Alwin Beukers,
Pieter-Paul Giesberts, Kan Yan, Franky (Zhenhui) Lin,
Piotr Figiel, Rafał Miłecki, YueHaibing, Kangjie Lu,
linux-wireless, brcm80211-dev-list.pdl, brcm80211-dev-list,
netdev, linux-kernel, emamd001, Navid Emamdoost
Navid Emamdoost <navid.emamdoost@gmail.com> wrote:
> 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 <navid.emamdoost@gmail.com>
Patch applied to wireless-drivers-next.git, thanks.
4282dc057d75 brcmfmac: Fix memory leak in brcmf_usbdev_qinit
--
https://patchwork.kernel.org/patch/11292553/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-18 19:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-15 1:51 [PATCH] brcmfmac: Fix memory leak in brcmf_usbdev_qinit Navid Emamdoost
2019-12-18 19:08 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).