Skip to content

Commit

Permalink
brcmfmac: Fix memory leak in brcmf_usbdev_qinit
Browse files Browse the repository at this point in the history
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: 71bb244 ("brcm80211: fmac: add USB support for bcm43235/6/8 chipsets")
Signed-off-by: Navid Emamdoost <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
  • Loading branch information
Navidem authored and Kalle Valo committed Dec 18, 2019
1 parent 2635853 commit 4282dc0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}
Expand Down

0 comments on commit 4282dc0

Please sign in to comment.