lkml.org 
[lkml]   [2014]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectComment added in 63662139e "params: Fix potential memory leak in add_sysfs_param()"
Date
Hi,

I'm not at all convinced by the comment added in commit
63662139e519ce. If krealloc(attrs, ...) fails, nothing seems to free attrs;
the krealloc() call certainly doesn't do it. If attrs was NULL to begin
with, no harm done, but otherwise it is "attrs = mk->mp->grp.attrs;",
and mk->mp is NULL'ed on the error path fail_free_new: (and the value of
mk->mp is anyway invalidated by the krealloc() above).

Am I missing something?

Rasmus


\
 
 \ /
  Last update: 2014-03-21 14:21    [W:0.039 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site