lkml.org 
[lkml]   [2017]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] perf tools: Use zfree() instead of free() in parse-events.c
From
Date


On 01/30/2017 06:01 PM, Jiri Olsa wrote:
> On Mon, Jan 30, 2017 at 02:23:38PM +0900, Taeung Song wrote:
>> Currently there are several parts not checking NULL
>> after allocating with zalloc() or asigning NULL value
>> to a pointer variable after doing free().
>>
>> So I fill in code checking NULL and
>> use zfree() instead of free().
>
> can't see directly reasons for zfree usage,
> but it looks reasonable.. do you have any
> crash reports due to missing zfree?

No, Just I read source code util/parse-events.c
And I found several insufficiency, shortcoming
not checking NULL or assigning NULL value to a pointer
variable after free().
So, I think we can use zfree() insteadof free()+assigning NULL.

Change commit message to be more appropriate ?

Thanks,
Taeung

\
 
 \ /
  Last update: 2017-01-30 11:48    [W:0.073 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site