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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux