tools lib traceevent: Free filter tokens in process_filter()
valgrind showed that the filter token wasn't being freed properly in process_filter(). Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/r/20150324135923.817723903@goodmis.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
82ac952be6
commit
e1644aae45
@ -1058,6 +1058,7 @@ process_filter(struct event_format *event, struct filter_arg **parg,
|
|||||||
*parg = current_op;
|
*parg = current_op;
|
||||||
else
|
else
|
||||||
*parg = current_exp;
|
*parg = current_exp;
|
||||||
|
free(token);
|
||||||
return PEVENT_ERRNO__UNBALANCED_PAREN;
|
return PEVENT_ERRNO__UNBALANCED_PAREN;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1168,6 +1169,7 @@ process_filter(struct event_format *event, struct filter_arg **parg,
|
|||||||
|
|
||||||
*parg = current_op;
|
*parg = current_op;
|
||||||
|
|
||||||
|
free(token);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
fail_alloc:
|
fail_alloc:
|
||||||
|
Loading…
Reference in New Issue
Block a user