lkml.org 
[lkml]   [2024]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] pinctrl: devicetree: fix refcount leak in pinctrl_dt_to_map()
From

在 2024/4/18 19:41, Andy Shevchenko 写道:
> On Thu, Apr 18, 2024 at 07:34:59PM +0800, Zeng Heng wrote:
>> If we fail to allocate propname buffer, we need to drop the reference
>> count we just took, otherwise it will lead reference leak. Here the
>> error exit path is modified to jump to the err label and call
>> pinctrl_dt_free_maps() which would drop the counter.
>>
>> In the meantime, if it is found that the property 'pinctrl-0' is not
>> present, ENODEV is returned and also jump to the err label and call the
>> free function, in case the Smatch tool complains.
>> ---
> You forgot a changelog, but I think this needs to be a followup.

Oops, the resend patch would come soon.


Thanks,

Zeng Heng


\
 
 \ /
  Last update: 2024-05-27 16:44    [W:0.029 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site