libtracefs: Close dir in the error path in tracefs_event_systems()

In tracefs_event_systems, we don't close dir if add_list_string()
fails. At this point, just breaking out of the loop fixes that.

Fixes a RESSOURCE_LEAK error (CWE-772)

Link: https://lore.kernel.org/linux-trace-devel/[email protected]

Fixes: 056a177e1d686 ("libtracefs: Restructure how string lists work")
Signed-off-by: Jerome Marchand <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 file changed