lkml.org 
[lkml]   [2022]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] net: sfp: fix memory leak in sfp_probe()
On Fri, 24 Jun 2022 12:49:41 +0800 Jianglei Nie wrote:
> 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().

Please add a Fixes tag referencing the commit which added the bug.
The subject for the next version should be start with [PATCH net v3].

\
 
 \ /
  Last update: 2022-06-28 07:11    [W:0.049 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site