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 14:43:41 +0000 (14:43 +0000)
commit6cb939e8d47d2edf74761d885aeb66a75d0620b5
tree4eb0f45e09fc2f2f6a9070cd5b851746e65d85a3
parent17d87b3e0b2e26b1ce13c70c10e998cbdcf2bb59
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