A number of issues were found by running static analysers on the code of trace-cmd with openscanhub[1]. Mostly ressource leak, but some are more serious like memory corruption. [1] https://fedoraproject.org/wiki/OpenScanHub Jerome Marchand (8): trace-cmd lib: Prevent a memory leak in handle_options() trace-cmd record: Prevent a memory leak in show_error() trace-cmd lib: Check the return value of do_lseek() in trace_get_options() trace-cmd dump: Prevent buffer overrun in dump_clock() trace-cmd record: Prevent memory leak in setup_network() trace-cmd lib: Prevent memory leak in tracecmd_create_event_hook() trace-cmd mem: Prevent a memory leak in trace_mem() trace-cmd record: Check the length of the protocol version received lib/trace-cmd/trace-hooks.c | 2 ++ lib/trace-cmd/trace-input.c | 7 +++---- lib/trace-cmd/trace-output.c | 2 ++ tracecmd/trace-dump.c | 2 +- tracecmd/trace-mem.c | 6 ++---- tracecmd/trace-record.c | 5 ++++- 6 files changed, 14 insertions(+), 10 deletions(-) -- 2.47.0