[Mesa-dev] [PATCH 3/4] r200: Free glCtx in radeonDestroyContext

Aaron Watry awatry at gmail.com
Thu Jan 2 10:38:05 PST 2014


Note: I don't have hardware to test this, but I believe it to be correct.

Found while tracking down a related leak in evergreen context management.
---
 src/mesa/drivers/dri/radeon/radeon_common_context.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
index 6dec137..161a0b7 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -245,8 +245,8 @@ void radeonDestroyContext(__DRIcontext *driContextPriv )
 	_swrast_DestroyContext( &radeon->glCtx );
 
 	/* free atom list */
-	/* free the Mesa context data */
-	_mesa_free_context_data(&radeon->glCtx);
+	/* free the Mesa context and its data */
+	_mesa_destroy_context(&radeon->glCtx);
 
 	/* free the option cache */
 	driDestroyOptionCache(&radeon->optionCache);
-- 
1.8.3.2



More information about the mesa-dev mailing list