Revision 3cec638b3d793b7cacdec5b8072364b41caeb0e1 authored by Steven Rostedt (VMware) on 10 December 2018, 02:17:30 UTC, committed by Steven Rostedt (VMware) on 11 December 2018, 18:50:19 UTC
When create_event_filter() fails in set_trigger_filter(), the filter may
still be allocated and needs to be freed. The caller expects the
data->filter to be updated with the new filter, even if the new filter
failed (we could add an error message by setting set_str parameter of
create_event_filter(), but that's another update).

But because the error would just exit, filter was left hanging and
nothing could free it.

Found by kmemleak detector.

Cc: stable@vger.kernel.org
Fixes: bac5fb97a173a ("tracing: Add and use generic set_trigger_filter() implementation")
Reviewed-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 parent b61c192
History
File Mode Size
Makefile -rw-r--r-- 381 bytes
clnt4xdr.c -rw-r--r-- 13.5 KB
clntlock.c -rw-r--r-- 7.4 KB
clntproc.c -rw-r--r-- 21.6 KB
clntxdr.c -rw-r--r-- 13.8 KB
host.c -rw-r--r-- 17.2 KB
mon.c -rw-r--r-- 14.3 KB
netns.h -rw-r--r-- 395 bytes
procfs.c -rw-r--r-- 1.8 KB
procfs.h -rw-r--r-- 474 bytes
svc.c -rw-r--r-- 19.1 KB
svc4proc.c -rw-r--r-- 14.1 KB
svclock.c -rw-r--r-- 25.1 KB
svcproc.c -rw-r--r-- 14.9 KB
svcshare.c -rw-r--r-- 2.4 KB
svcsubs.c -rw-r--r-- 10.3 KB
xdr.c -rw-r--r-- 7.3 KB
xdr4.c -rw-r--r-- 7.6 KB

back to top