tools lib traceevent: Fix memory leakage in filter_event
authorHewenliang <hewenliang4@huawei.com>
Mon, 9 Dec 2019 06:35:49 +0000 (01:35 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Feb 2020 21:22:43 +0000 (21:22 +0000)
commit91f91139d32fa74b99812395ffcb3f87647f0f28
tree2a209f28e14bde4a4e7287fd44a62ea8d1d887bc
parent22946b83976854ababbe73b1b56cbe6e6a55db48
tools lib traceevent: Fix memory leakage in filter_event

[ Upstream commit f84ae29a6169318f9c929720c49d96323d2bbab9 ]

It is necessary to call free_arg(arg) when add_filter_type() returns NULL
in filter_event().

Signed-off-by: Hewenliang <hewenliang4@huawei.com>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Feilong Lin <linfeilong@huawei.com>
Cc: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Link: http://lore.kernel.org/lkml/20191209063549.59941-1-hewenliang4@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/lib/traceevent/parse-filter.c