aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (Google) <rostedt@goodmis.org>2023-10-11 22:30:31 -0400
committerSteven Rostedt (Google) <rostedt@goodmis.org>2023-12-28 15:28:48 -0500
commit420d67727d46894fbf9e0c42ddec659e0354c84d (patch)
treec197ccd347a77bcbbfb358b8edf9d5231b4bb66a
parent3f436fca67f5ca38671e5160f299ce15eacb0ef8 (diff)
downloadlibtracefs-420d67727d46894fbf9e0c42ddec659e0354c84d.tar.gz
libtracefs: Free "followers" when freeing instance
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! Link: https://lore.kernel.org/linux-trace-devel/20231011223031.0aa32a57@gandalf.local.home Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r--src/tracefs-instance.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tracefs-instance.c b/src/tracefs-instance.c
index b3ed983..be1478e 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);