commit | 7d77b83ce83c318cb83cf2529f45cc950edb44d5 | [log] [tgz] |
---|---|---|
author | Jerome Marchand <jmarchan@redhat.com> | Thu Jun 06 17:38:22 2024 +0200 |
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | Fri Jun 14 22:43:26 2024 -0400 |
tree | e608732eeb58c120d793b6040aa32dcf37f5a506 | |
parent | 7fcd8d27ff95670ffb0478486d408162f5299e89 [diff] |
libtracefs: Prevent a memory leak in tracefs_system_events() If add_list_string() fails, event isn't freed. Free event before calling add_list_string(); Fixes a RESSOURCE_LEAK error (CWE-772) Link: https://lore.kernel.org/linux-trace-devel/20240606153830.2666120-9-jmarchan@redhat.com Fixes: 056a177e1d686 ("libtracefs: Restructure how string lists work") Signed-off-by: Jerome Marchand <jmarchan@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>