libtracefs: Prevent memory leak in tracefs_instance_create()

Free the path of the instance directory in the error path.

Fixes a RESSOURCE_LEAK error (CWE-772)

Link: https://lore.kernel.org/linux-trace-devel/20240606153830.2666120-11-jmarchan@redhat.com

Fixes: ebbb8507de560 libtracefs: Combine allocate and create APIs into one
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 file changed