From: Kenneth Graunke Date: Thu, 4 Jul 2013 17:37:31 +0000 (-0700) Subject: i965: Free brw, not intel. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=351d2add6218947a142e611cb0a1121cd19242e1;p=mesa.git i965: Free brw, not intel. Things worked out in the past because both brw and intel share the same memory address (by virtue of intel being the first member of brw). However, brw is what actually gets rzalloc'd (brw_context.c:285), so freeing that seems safer and more obvious. Signed-off-by: Kenneth Graunke Acked-by: Chris Forbes Acked-by: Paul Berry Acked-by: Anuj Phogat --- diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index c9a5897ec5f..fee68b60c9b 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -639,7 +639,7 @@ intelDestroyContext(__DRIcontext * driContextPriv) /* free the Mesa context */ _mesa_free_context_data(&intel->ctx); - ralloc_free(intel); + ralloc_free(brw); driContextPriv->driverPrivate = NULL; } }