mbox series

[00/15] libtracefs: fix misc issues found by static analysis

Message ID 20240606153830.2666120-1-jmarchan@redhat.com (mailing list archive)
Headers show
Series libtracefs: fix misc issues found by static analysis | expand

Message

Jerome Marchand June 6, 2024, 3:38 p.m. UTC
A number of issues were found by running static analysers on the code
of trace-cmd with openscanhub[1]. Mostly ressource leaks.

[1] https://fedoraproject.org/wiki/OpenScanHub

Jerome Marchand (15):
  libtracefs: call va_end() before exiting tracefs_hist_set_sort_key()
  libtracefs: prevent memory leak in append_filer()
  libtracefs: prevent a memory leak in update_fields()
  libtracefs: prevent a memory leak in tracefs_synth_add_end_field()
  libtracefs: prevent memory leak in tracefs_event_systems()
  libtracefs: don't leak socket file descriptor in open_vsock()
  libtracefs: prevent a memory leak in add_func_str()
  libtracefs: prevent a memory leak in tracefs_system_events()
  libtracefs: prevent a memory leak in open_cpu_files()
  libtracefs: prevent memory leak in tracefs_instance_create()
  libtracefs: my_yyinput() should return 0 when no data can be read
  libtracefs: prevent memory leak in tracefs_dynevent_get_all()
  libtracefs: close dir in the error path in tracefs_system_events()
  libtracefs: close dir in the error path in tracefs_event_systems()
  libtracefs: initialize val in build_filter()

 src/tracefs-dynevents.c |  1 +
 src/tracefs-events.c    | 21 ++++++++++-----------
 src/tracefs-filter.c    |  6 ++++--
 src/tracefs-hist.c      | 10 ++++++----
 src/tracefs-instance.c  |  1 +
 src/tracefs-sqlhist.c   |  6 +++---
 src/tracefs-tools.c     |  4 +++-
 src/tracefs-vsock.c     |  4 +++-
 8 files changed, 31 insertions(+), 22 deletions(-)