i965: fix disk_cache leak when destroying context
authorTapani Pälli <tapani.palli@intel.com>
Fri, 26 Jan 2018 08:47:31 +0000 (10:47 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Mon, 29 Jan 2018 06:11:14 +0000 (08:11 +0200)
commitb99c88037bf64b033579f237ec287857c53b0ad6
treee298cfbb890365d71f6e84ca3d96e2cd27eba4d3
parent28db950b51274ce296cd625db62abe935d1e4ed9
i965: fix disk_cache leak when destroying context

   ==2780== 1,024 bytes in 1 blocks are possibly lost in loss record 180 of 205
   ==2780==    at 0x4C31A1E: calloc (vg_replace_malloc.c:711)
   ==2780==    by 0x13F6467E: util_queue_init (u_queue.c:309)
   ==2780==    by 0x13F5C9F6: disk_cache_create (disk_cache.c:369)
   ==2780==    by 0x13F05406: brw_disk_cache_init (brw_disk_cache.c:428)
   ==2780==    by 0x13F01E78: brwCreateContext (brw_context.c:1068)

Fixes: 1a61a8b9a7c ("i965: Initialize disk shader cache if MESA_GLSL_CACHE_DISABLE is false")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_context.c