lkml.org 
[lkml]   [2022]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] net: sfp: fix memory leak in sfp_probe()
Date
Hi,

> err = devm_add_action(sfp->dev, sfp_cleanup, sfp);
> - if (err < 0)
> + if (err < 0) {
> + sfp_cleanup(sfp);
> return err;
> + }

Better use devm_add_action_or_reset(), no?

-michael

\
 
 \ /
  Last update: 2022-06-23 09:21    [W:0.071 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site