Skip to contentSkip to conversation

libtracefs: Free "followers" when freeing instance

PATCH New Steven Rostedt 1 participant 1 message Oct 12, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libtracefs: Free "followers" when freeing instance

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

While running valgrind on an application that uses libtracefs, it revealed that "followers" from tracefs_follow_event() is not freed if called for an instance when the instance is freed.

Free it!

---
 src/tracefs-instance.c | 1 +
 1 file changed, 1 insertion(+)
src/tracefs-instance.c +1 -0
index b3ed983db0e8..be1478ee7a92 100644
@@ -123,6 +123,7 @@ __hidden void trace_put_instance(struct tracefs_instance *instance)
 		close(instance->ftrace_marker_raw_fd);
 
 	free(instance->trace_dir);
+	free(instance->followers);
 	free(instance->name);
 	pthread_mutex_destroy(&instance->lock);
 	free(instance);
Signature · 1 line
2.42.0