summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorWentao Liang <vulab@iscas.ac.cn>2026-06-09 11:37:09 +0300
committerJakub Kicinski <kuba@kernel.org>2026-06-12 01:49:06 +0300
commit41c8c1d65b32beacd8d916a22457b4f6e47f45af (patch)
treebeba7e210815c90a81f1f91c7ea12f94c2922a20 /tools/lib/python
parente9bcf842b39a09308e971d3426ea43e9ebaa7d2b (diff)
downloadlinux-41c8c1d65b32beacd8d916a22457b4f6e47f45af.tar.xz
mlxsw: fix refcount leak in mlxsw_sp_port_lag_join()
When mlxsw_sp_port_lag_index_get() fails, mlxsw_sp_port_lag_join() returns an error without releasing the lag reference obtained by the earlier mlxsw_sp_lag_get(). All other error paths in the function jump to the cleanup label that ends with mlxsw_sp_lag_put(), so this is a single missed release. Fix the leak by replacing the bare 'return err' with a goto to the existing error cleanup label, which will drop the reference safely. Cc: stable@vger.kernel.org Fixes: 0d65fc13042f ("mlxsw: spectrum: Implement LAG port join/leave") Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20260609083709.209743-1-vulab@iscas.ac.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions