diff mbox series

libtracefs: Have tracefs_instance_destroy() match the man page

Message ID 20210412165336.37d46e05@gandalf.local.home (mailing list archive)
State Superseded
Headers show
Series libtracefs: Have tracefs_instance_destroy() match the man page | expand

Commit Message

Steven Rostedt April 12, 2021, 8:53 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

According to the man page of tracefs_instance_destroy():

 "The tracefs_instance_destroy() frees the instance structure, and will also
  remove the trace instance from the system."

But, it does not actually free the instance. Have it do so.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 src/tracefs-instance.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/tracefs-instance.c b/src/tracefs-instance.c
index b8ce36f..67e7991 100644
--- a/src/tracefs-instance.c
+++ b/src/tracefs-instance.c
@@ -247,7 +247,7 @@  int tracefs_instance_destroy(struct tracefs_instance *instance)
 	if (path)
 		ret = rmdir(path);
 	tracefs_put_tracing_file(path);
-
+	tracefs_instance_free(instance);
 	return ret;
 }