trace-cmd list: Check if any functions were found
The trace-cmd list operation on functions will crash if no functions were
found:
$ trace-cmd list -f aueaeu
Segmentation fault
The list returned is NULL but the code still loops over the list of found
functions. Do not loop if no function is found.
Link: https://lore.kernel.org/20250404154949.6422bc8a@gandalf.local.home
Fixes: 39acb4cc1 ("trace-cmd list: Use tracefs_filter_functions()")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 file changed