Commit 956fb851 authored by Yuan Can's avatar Yuan Can Committed by Kalle Valo

wifi: rsi: Fix memory leak in rsi_coex_attach()

The coex_cb needs to be freed when rsi_create_kthread() failed in
rsi_coex_attach().

Fixes: 2108df3c ("rsi: add coex support")
Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221205061441.114632-1-yuancan@huawei.com
parent d1c72286
...@@ -160,6 +160,7 @@ int rsi_coex_attach(struct rsi_common *common) ...@@ -160,6 +160,7 @@ int rsi_coex_attach(struct rsi_common *common)
rsi_coex_scheduler_thread, rsi_coex_scheduler_thread,
"Coex-Tx-Thread")) { "Coex-Tx-Thread")) {
rsi_dbg(ERR_ZONE, "%s: Unable to init tx thrd\n", __func__); rsi_dbg(ERR_ZONE, "%s: Unable to init tx thrd\n", __func__);
kfree(coex_cb);
return -EINVAL; return -EINVAL;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment