mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
brcm80211: fix possible memleak in brcmf_proto_msgbuf_attach
[ Upstream commit 6c151410d5 ]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
36df67bd00
commit
5912b09c97
@@ -1619,6 +1619,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;
|
||||
|
||||
Reference in New Issue
Block a user