diff mbox

[i-g-t,2/5] tests/igt_stats: Call igt_stats_fini() to not leak the array

Message ID 1435274819-2777-2-git-send-email-damien.lespiau@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lespiau, Damien June 25, 2015, 11:26 p.m. UTC
Sure, it'll be freed at exit(), but might as well be a bit pedantic.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 lib/tests/igt_stats.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Chris Wilson June 26, 2015, 9:58 a.m. UTC | #1
On Fri, Jun 26, 2015 at 12:26:56AM +0100, Damien Lespiau wrote:
> Sure, it'll be freed at exit(), but might as well be a bit pedantic.
s/pedantic/pedagological/

Tests also serve as examples and will undoubtably be copy-pasted at some
point.
-Chris
diff mbox

Patch

diff --git a/lib/tests/igt_stats.c b/lib/tests/igt_stats.c
index 3f45314..c20b453 100644
--- a/lib/tests/igt_stats.c
+++ b/lib/tests/igt_stats.c
@@ -41,6 +41,8 @@  static void test_mean(void)
 	mean = igt_stats_get_mean(&stats);
 
 	igt_assert(mean == (2 + 4 + 6 + 8 + 10) / 5.);
+
+	igt_stats_fini(&stats);
 }
 
 igt_simple_main