diff options
author | 2022-06-29 15:55:50 +0800 | |
---|---|---|
committer | 2022-06-30 11:38:16 +0200 | |
commit | 0a18d802d65cf662644fd1d369c86d84a5630652 (patch) | |
tree | f8d20ec84e2c949d8acff299481717ab216c062a /net/unix/sysctl_net_unix.c | |
parent | mlxsw: spectrum_router: Fix rollback in tunnel next hop init (diff) | |
download | wireguard-linux-0a18d802d65cf662644fd1d369c86d84a5630652.tar.xz wireguard-linux-0a18d802d65cf662644fd1d369c86d84a5630652.zip |
net: sfp: fix memory leak in sfp_probe()
sfp_probe() allocates a memory chunk from sfp with sfp_alloc(). When
devm_add_action() fails, sfp is not freed, which leads to a memory leak.
We should use devm_add_action_or_reset() instead of devm_add_action().
Signed-off-by: Jianglei Nie <niejianglei2021@163.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/20220629075550.2152003-1-niejianglei2021@163.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions