Messages in this thread | | | Date | Tue, 01 Sep 2009 08:50:51 +0800 | From | Li Zefan <> | Subject | Re: [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.
| |