* [PATCH] libtracefs: Free "followers" when freeing instance
@ 2023-10-12 2:30 Steven Rostedt
0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2023-10-12 2:30 UTC (permalink / raw)
To: Linux Trace Devel
|From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
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!
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
src/tracefs-instance.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/tracefs-instance.c b/src/tracefs-instance.c
index b3ed983db0e8..be1478ee7a92 100644
--- a/src/tracefs-instance.c
+++ b/src/tracefs-instance.c
@@ -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);
--
2.42.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-12 2:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-12 2:30 [PATCH] libtracefs: Free "followers" when freeing instance Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).