Skip to content

Commit 6c15141

Browse files
wangyufen316Kalle Valo
authored and
Kalle Valo
committed
brcm80211: fix possible memleak in brcmf_proto_msgbuf_attach
When brcmf_proto_msgbuf_attach fail and msgbuf->txflow_wq != NULL, we should destroy the workqueue. Reported-by: Hulk Robot <[email protected]> Signed-off-by: Wang Yufen <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 9123e3a commit 6c15141

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/wireless/broadcom/brcm80211/brcmfmac

1 file changed

+2
-0
lines changed

drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c

+2
Original file line numberDiff line numberDiff line change
@@ -1620,6 +1620,8 @@ int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr)
16201620
BRCMF_TX_IOCTL_MAX_MSG_SIZE,
16211621
msgbuf->ioctbuf,
16221622
msgbuf->ioctbuf_handle);
1623+
if (msgbuf->txflow_wq)
1624+
destroy_workqueue(msgbuf->txflow_wq);
16231625
kfree(msgbuf);
16241626
}
16251627
return -ENOMEM;

0 commit comments

Comments
 (0)