Skip to contentSkip to conversation

libtracefs: Have tracefs_instance_destroy() match the man page

PATCH Superseded Steven Rostedt 1 participant 1 message Apr 12, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libtracefs: Have tracefs_instance_destroy() match the man page

From: "Steven Rostedt (VMware)" <[email protected]>

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.

---
 src/tracefs-instance.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/tracefs-instance.c +1 -1
index b8ce36f..67e7991 100644
@@ -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;
 }
 
Signature · 1 line
2.29.2