aboutsummaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorJianglei Nie <[email protected]>2022-06-29 15:55:50 +0800
committerPaolo Abeni <[email protected]>2022-06-30 11:38:16 +0200
commit0a18d802d65cf662644fd1d369c86d84a5630652 (patch)
treef8d20ec84e2c949d8acff299481717ab216c062a /lib/memory-notifier-error-inject.c
parent665030fd0c1ed9f505932e6e73e7a2c788787a0a (diff)
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 <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions