Commit 5cabc94c authored by Zhengchao Shao's avatar Zhengchao Shao Committed by sanglipeng
Browse files

wifi: libertas: fix memory leak in lbs_init_adapter()

stable inclusion
from stable-v5.10.173
commit 9c8f50c7433bdfba1588831c413136ecc3f29f99
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8BFR3

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



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

[ Upstream commit 16a03958 ]

When kfifo_alloc() failed in lbs_init_adapter(), cmd buffer is not
released. Add free memory to processing error path.

Fixes: 7919b89c ("libertas: convert libertas driver to use an event/cmdresp queue")
Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221208121448.2845986-1-shaozhengchao@huawei.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 62676e85
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment