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: 71bb244ba2 ("brcm80211: fmac: add USB support for bcm43235/6/8 chipsets")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Navid Emamdoost 2019-12-14 19:51:14 -06:00 committed by Kalle Valo
parent 2635853ce4
commit 4282dc057d
1 changed files with 1 additions and 0 deletions

View File

@ -430,6 +430,7 @@ fail:
usb_free_urb(req->urb);
list_del(q->next);
}
kfree(reqs);
return NULL;
}