[Mesa-dev] [RFC 3/7] gallium/swrast: fix dri_sw_dt->data free func not matching alloc func

Chih-Wei Huang cwhuang at android-x86.org
Thu Apr 28 07:34:56 UTC 2016


From: WuZhen <wuzhen at jidemail.com>

The old code causes crashes when using software rendering.

NO_REF_TASK
tested: local run

Change-Id: Ib1d7f388886b9f25ccc13afdd28d1e34f76162d3
Signed-off-by: Chih-Wei Huang <cwhuang at linux.org.tw>
---
 src/gallium/winsys/sw/dri/dri_sw_winsys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/winsys/sw/dri/dri_sw_winsys.c b/src/gallium/winsys/sw/dri/dri_sw_winsys.c
index 5c98f26..94d5092 100644
--- a/src/gallium/winsys/sw/dri/dri_sw_winsys.c
+++ b/src/gallium/winsys/sw/dri/dri_sw_winsys.c
@@ -125,7 +125,7 @@ dri_sw_displaytarget_destroy(struct sw_winsys *ws,
 {
    struct dri_sw_displaytarget *dri_sw_dt = dri_sw_displaytarget(dt);
 
-   FREE(dri_sw_dt->data);
+   align_free(dri_sw_dt->data);
 
    FREE(dri_sw_dt);
 }
-- 
1.9.1



More information about the mesa-dev mailing list