Skip to content
Commit 4ad63eab authored by Zhipeng Lu's avatar Zhipeng Lu Committed by Zhang Changzhong
Browse files

wifi: libertas: fix some memleaks in lbs_allocate_cmd_buffer()

stable inclusion
from stable-v4.19.311
commit 96481624fb5a6319079fb5059e46dbce43a90186
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9Q98R
CVE: CVE-2024-35828

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=96481624fb5a6319079fb5059e46dbce43a90186



--------------------------------

[ Upstream commit 5f0e4aede01cb01fa633171f0533affd25328c3a ]

In the for statement of lbs_allocate_cmd_buffer(), if the allocation of
cmdarray[i].cmdbuf fails, both cmdarray and cmdarray[i].cmdbuf needs to
be freed. Otherwise, there will be memleaks in lbs_allocate_cmd_buffer().

Fixes: 876c9d3a ("[PATCH] Marvell Libertas 8388 802.11b/g USB driver")
Signed-off-by: default avatarZhipeng Lu <alexious@zju.edu.cn>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240126075336.2825608-1-alexious@zju.edu.cn


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
parent f5fda1e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment