Commit 0eb1a435 authored by Navid Emamdoost's avatar Navid Emamdoost Committed by Greg Kroah-Hartman

brcmfmac: Fix memory leak in brcmf_usbdev_qinit

commit 4282dc05 upstream.

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: 71bb244b ("brcm80211: fmac: add USB support for bcm43235/6/8 chipsets")
Signed-off-by: default avatarNavid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 00b13445
......@@ -441,6 +441,7 @@ brcmf_usbdev_qinit(struct list_head *q, int qsize)
usb_free_urb(req->urb);
list_del(q->next);
}
kfree(reqs);
return NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment