summaryrefslogtreecommitdiff
path: root/tests/gem_storedw_loop.c
diff options
context:
space:
mode:
authorRobert Beckett <robert.beckett@intel.com>2015-09-22 19:02:39 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-09-23 18:00:46 +0200
commitfb66cd5c346d91407f43879582da80781eed7c97 (patch)
tree8b179f5ee3ea971b6eadd1214a3ea8b5f297b617 /tests/gem_storedw_loop.c
parenta16704261fc12259a2e61c00c3cef7be568d71f9 (diff)
tests/gem_storedw_loop: Fix use after free for bufmgr
Move bufmgr destruction to end of tests. This avoids use after free on successive tests. This could be squashed with the following patch to aid bisectability: commit 0679702150157706a6def66b893b29c16345f4db Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Wed Aug 5 16:06:31 2015 -0700 tests/gem_storedw_loop: add new store_dword test to unify per-ring ones v2 Signed-off-by: Robert Beckett <robert.beckett@intel.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_storedw_loop.c')
-rw-r--r--tests/gem_storedw_loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/gem_storedw_loop.c b/tests/gem_storedw_loop.c
index 10b12d41..e7ebcc2d 100644
--- a/tests/gem_storedw_loop.c
+++ b/tests/gem_storedw_loop.c
@@ -128,7 +128,6 @@ store_test(int ring, int count)
drm_intel_bo_unreference(target_buffer);
intel_batchbuffer_free(batch);
- drm_intel_bufmgr_destroy(bufmgr);
}
struct ring {
@@ -181,5 +180,6 @@ igt_main
}
}
+ drm_intel_bufmgr_destroy(bufmgr);
close(fd);
}