From 34763549cd7de147951744d9f389b4ed5c6d686e Mon Sep 17 00:00:00 2001 From: WuZhen Date: Sat, 16 Jan 2016 22:53:29 +0800 Subject: st/dri: fix double free of dri_drawable In the callchain destroy_surface->destroyDrawable->dri_put_drawable-> dri_put_drawable->DestroyBuffer By the semantic of it, dri_destroy_buffer should not free drawable struct, all vendor specific and legacy swrast version of the function do not. wonder why no body else ran into this. NO_REF_TASK Tested: local run Change-Id: Ibe82d82d2e34b162e64bf0b8805f8a4553d362d5 Signed-off-by: Chih-Wei Huang --- src/gallium/state_trackers/dri/dri_drawable.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/gallium/state_trackers') diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c index edcd0e6..474c331 100644 --- a/src/gallium/state_trackers/dri/dri_drawable.c +++ b/src/gallium/state_trackers/dri/dri_drawable.c @@ -176,8 +176,6 @@ dri_destroy_buffer(__DRIdrawable * dPriv) pipe_resource_reference(&drawable->msaa_textures[i], NULL); swap_fences_unref(drawable); - - FREE(drawable); } /** -- cgit v1.1