diff options
author | Thomas Wood <thomas.wood@intel.com> | 2015-09-24 11:04:34 +0100 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2015-09-24 11:04:34 +0100 |
commit | 9edf293c4566ffdc0937c800035dd2d215355674 (patch) | |
tree | df0e67b6094e487082d405aa2a4dd88121a97ced /tests/gem_storedw_loop.c | |
parent | fb66cd5c346d91407f43879582da80781eed7c97 (diff) |
gem_storedw_loop: fix segfault when listing subtests
Commit fb66cd5 (tests/gem_storedw_loop: Fix use after free for bufmgr)
introduced a segmentation fault when listing subtests because
drm_intel_bufmgr_destroy is called with NULL. Move this and the call to
the close function inside an igt_fixture block to prevent them being
called when listing subtests.
Cc: Robert Beckett <robert.beckett@intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'tests/gem_storedw_loop.c')
-rw-r--r-- | tests/gem_storedw_loop.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/gem_storedw_loop.c b/tests/gem_storedw_loop.c index e7ebcc2d..e17e1902 100644 --- a/tests/gem_storedw_loop.c +++ b/tests/gem_storedw_loop.c @@ -180,6 +180,8 @@ igt_main } } - drm_intel_bufmgr_destroy(bufmgr); - close(fd); + igt_fixture { + drm_intel_bufmgr_destroy(bufmgr); + close(fd); + } } |