[Intel-gfx] [PATCH i-g-t 2/2] kms_flip: Don't access freed data

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Mon Mar 4 14:34:07 CET 2013


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 tests/kms_flip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 0da40d3..902ac31 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -489,8 +489,8 @@ static void recreate_fb(struct test_output *o)
 			       o->bpp, fb_info->stride,
 			       r->handle, &new_fb_id));
 
-	drmFree(r);
 	gem_close(drm_fd, r->handle);
+	drmFree(r);
 	do_or_die(drmModeRmFB(drm_fd, fb_info->fb_id));
 
 	o->fb_ids[o->current_fb_id] = new_fb_id;
-- 
1.7.12.4




More information about the Intel-gfx mailing list