mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 04:47:05 +00:00
net: wwan: iosm: fix memory leak in ipc_mux_init()
[ Upstream commit23353efc26
] When failed to alloc ipc_mux->ul_adb.pp_qlt in ipc_mux_init(), ipc_mux is not released. Fixes:1f52d7b622
("net: wwan: iosm: Enable M.2 7360 WWAN card support") Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com> Reviewed-by: M Chetan Kumar <m.chetan.kumar@intel.com> Link: https://lore.kernel.org/r/20221203020903.383235-1-shaozhengchao@huawei.com Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
064ebe2c83
commit
e21478d005
1 changed files with 1 additions and 0 deletions
|
@ -332,6 +332,7 @@ struct iosm_mux *ipc_mux_init(struct ipc_mux_config *mux_cfg,
|
|||
if (!ipc_mux->ul_adb.pp_qlt[i]) {
|
||||
for (j = i - 1; j >= 0; j--)
|
||||
kfree(ipc_mux->ul_adb.pp_qlt[j]);
|
||||
kfree(ipc_mux);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue