lkml.org 
[lkml]   [2016]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regulator: core: Clear constraints pointer after free on error path
On Tue, Jan 26, 2016 at 03:34:54PM +0000, Mark Brown wrote:
> On Tue, Jan 26, 2016 at 03:14:16PM +0000, Charles Keepax wrote:
>
> > As we now free the constraints in regulator_dev_release we will still
> > call free on the constraints pointer even if we went down an error path
> > in regulator_register, as such we need to clear to the pointer to ensure
> > the kfree in regulator_dev_release is a no-op.
>
> No, this is just making things worse - if we're doing the free in the
> release we should be doing the free in the release not sometimes maybey
> in the release.

Fair enough I will respin to remove the other free's.

Thanks,
Charles

\
 
 \ /
  Last update: 2016-01-26 17:41    [W:0.054 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site