summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2018-01-26 10:47:31 +0200
committerEmil Velikov <[email protected]>2018-02-05 16:41:05 +0000
commit753e9d6dd23042d278166f235348c263098bc71d (patch)
tree74dfed72fec8eb52f95010c2f16945fcbec72d58 /src/mesa
parent62e8b651b1e005bf06452fe2aa8461a8513b274a (diff)
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 <[email protected]> Cc: [email protected] Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Jordan Justen <[email protected]> (cherry picked from commit b99c88037bf64b033579f237ec287857c53b0ad6)
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index b830e712476..98cb0168667 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -73,6 +73,7 @@
#include "tnl/t_pipeline.h"
#include "util/ralloc.h"
#include "util/debug.h"
+#include "util/disk_cache.h"
#include "isl/isl.h"
/***************************************
@@ -1129,6 +1130,8 @@ intelDestroyContext(__DRIcontext * driContextPriv)
driDestroyOptionCache(&brw->optionCache);
+ disk_cache_destroy(brw->ctx.Cache);
+
/* free the Mesa context */
_mesa_free_context_data(&brw->ctx);