tracing/filters: Defer pred allocation, fix memory leak
authorLi Zefan <lizf@cn.fujitsu.com>
Tue, 1 Sep 2009 05:31:38 +0000 (13:31 +0800)
committerFrederic Weisbecker <fweisbec@gmail.com>
Fri, 4 Sep 2009 21:22:33 +0000 (23:22 +0200)
The predicates of an event and their filter structure are allocated
when we create an event filter for the first time.

These objects must be created once but each time we come with a new
filter, we overwrite such pre-existing allocation, if any.

Thus, this patch checks if the filter has already been allocated
before going ahead.

Spotted-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
LKML-Reference: <4A9CB1BA.3060402@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>

No differences found