diff options
author | Wang Yufen <wangyufen@huawei.com> | 2020-07-20 17:36:05 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-08-18 15:46:15 +0300 |
commit | 6c151410d5b57e6bb0d91a735ac511459539a7bf (patch) | |
tree | 97e36ed2d136eea63b023746a5f5c0a70a2ece1c /drivers/net/wireless/broadcom | |
parent | 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5 (diff) | |
download | linux-6c151410d5b57e6bb0d91a735ac511459539a7bf.tar.bz2 |
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 <hulkci@huawei.com>
Signed-off-by: Wang Yufen <wangyufen@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1595237765-66238-1-git-send-email-wangyufen@huawei.com
Diffstat (limited to 'drivers/net/wireless/broadcom')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c index f1a20db8daab..bfddb851e386 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c @@ -1620,6 +1620,8 @@ fail: BRCMF_TX_IOCTL_MAX_MSG_SIZE, msgbuf->ioctbuf, msgbuf->ioctbuf_handle); + if (msgbuf->txflow_wq) + destroy_workqueue(msgbuf->txflow_wq); kfree(msgbuf); } return -ENOMEM; |