i965: Free brw, not intel. 14/7414/1
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 4 Jul 2013 17:37:31 +0000 (10:37 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 9 Jul 2013 21:09:28 +0000 (14:09 -0700)
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 <kenneth@whitecape.org>
Acked-by: Chris Forbes <chrisf@ijw.co.nz>
Acked-by: Paul Berry <stereotype441@gmail.com>
Acked-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/intel_context.c

index c9a5897..fee68b6 100644 (file)
@@ -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;
    }
 }