From cff9de18eebbbbc9b88e51483f5e471afbafaac1 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 22 Oct 2013 17:43:31 -0700 Subject: [PATCH] Close two memory leaks in fips metrics reporting. Thanks to valgrind for pointing these out. --- metrics.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/metrics.c b/metrics.c index f1f4428..38e9e95 100644 --- a/metrics.c +++ b/metrics.c @@ -489,6 +489,8 @@ print_program_metrics (void) for (i = 0; i < ctx->num_op_metrics; i++) print_op_metrics (ctx, &ctx->op_metrics[sorted[i]], total); + + free (sorted); } /* Called at program exit */ @@ -574,6 +576,8 @@ metrics_end_frame (void) accumulate_program_metrics (monitor->op, result, result_size); + free (result); + current_context.monitor_head = monitor->next; if (current_context.monitor_head == NULL) current_context.monitor_tail = NULL; -- 2.43.0