lkml.org 
[lkml]   [2009]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tracing/filters: Defer pred allocation
>> @@ -1094,6 +1118,10 @@ int apply_event_filter(struct ftrace_event_call *call, char *filter_string)
>>
>> mutex_lock(&event_mutex);
>>
>> + err = init_preds(call);
>> + if (err)
>> + goto out_unlock;
>
>
>
> Hmm, but what happens if the filter already has its preds initialized
> by a previous filter?
>
> The first thing that init_preds() does is:
>
> filter = call->filter = kzalloc(sizeof(*filter), GFP_KERNEL);
>
> That looks like a memory leak.
>

Oops! I thought I had added a check in it.

Thanks.



\
 
 \ /
  Last update: 2009-09-01 02:55    [W:0.084 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site