From: Robert Beckett <robert.beck...@intel.com>

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 <jbar...@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.beck...@intel.com>
Cc: Jesse Barnes <jbar...@virtuousgeek.org>
---
 tests/gem_storedw_loop.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/gem_storedw_loop.c b/tests/gem_storedw_loop.c
index 10b12d4..e7ebcc2 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);
 }
-- 
1.7.9.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to