From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Cc: Ross Zwisler <zwisler@google.com>
Subject: [PATCH] libtraceeval: Fix some missing frees
Date: Tue, 10 Oct 2023 23:08:55 -0400 [thread overview]
Message-ID: <20231010230855.094adc42@rorschach.local.home> (raw)
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
Free entry val_stats array for each element when freeing a traceeval.
Free the internal delta of a traceeval.
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
src/histograms.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/histograms.c b/src/histograms.c
index ea44814b7693..e16f0e9e903e 100644
--- a/src/histograms.c
+++ b/src/histograms.c
@@ -485,6 +485,7 @@ static void free_entry(struct traceeval *teval, struct entry *entry)
clean_data_set(entry->keys, teval->key_types, teval->nr_key_types);
clean_data_set(entry->vals, teval->val_types, teval->nr_val_types);
+ free(entry->val_stats);
free(entry);
}
@@ -527,6 +528,7 @@ void traceeval_release(struct traceeval *teval)
if (!teval)
return;
+ __delta_release(teval->tdelta);
hist_table_release(teval);
type_release(teval->key_types, teval->nr_key_types);
type_release(teval->val_types, teval->nr_val_types);
--
2.42.0
reply other threads:[~2023-10-11 3:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231010230855.094adc42@rorschach.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=zwisler@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox