net: marvell: prestera: fix memory leak in prestera_rxtx_switch_init()
stable inclusion from stable-v5.10.155 commit 5333cf1b7f6861912aff6263978d4781f9858e47 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7M5F4 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5333cf1b7f6861912aff6263978d4781f9858e47 -------------------------------- [ Upstream commit 519b58bb ] When prestera_sdma_switch_init() failed, the memory pointed to by sw->rxtx isn't released. Fix it. Only be compiled, not be tested. Fixes: 501ef306 ("net: marvell: prestera: Add driver for Prestera family ASIC devices") Signed-off-by:Zhengchao Shao <shaozhengchao@huawei.com> Reviewed-by:
Vadym Kochan <vadym.kochan@plvision.eu> Link: https://lore.kernel.org/r/20221108025607.338450-1-shaozhengchao@huawei.com Signed-off-by:
Jakub Kicinski <kuba@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment