From f75dec0b415c8c319b9aae32cfdbac6144f3e770 Mon Sep 17 00:00:00 2001 From: Ben Widawsky Date: Tue, 8 Oct 2013 18:30:13 -0700 Subject: [PATCH] gem_tiled_blits: Squash memory leak on simulation Signed-off-by: Ben Widawsky --- tests/gem_tiled_blits.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/gem_tiled_blits.c b/tests/gem_tiled_blits.c index 9df3e74..9a13096 100644 --- a/tests/gem_tiled_blits.c +++ b/tests/gem_tiled_blits.c @@ -149,8 +149,11 @@ static void run_test(int count) for (i = 0; i < count; i++) check_bo(bo[i], bo_start_val[i]); - if (igt_run_in_simulation()) + if (igt_run_in_simulation()) { + free(bo_start_val); + free(bo); return; + } printf("Cyclic blits, backward...\n"); for (i = 0; i < count * 4; i++) { @@ -182,6 +185,7 @@ static void run_test(int count) drm_intel_bo_unreference(bo[i]); } + free(bo_start_val); free(bo); } -- 2.7.4