Mesa (master): i965: Fix oversized initial allocation of the state cache table pointers.

Eric Anholt anholt at kemper.freedesktop.org
Sun Nov 4 20:24:37 UTC 2012


Module: Mesa
Branch: master
Commit: 5ac46da58893e06b48071358a9070408e11e14cf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ac46da58893e06b48071358a9070408e11e14cf

Author: Vandrus Zoltán <szunti at gmail.com>
Date:   Wed Oct 31 13:11:45 2012 -0700

i965: Fix oversized initial allocation of the state cache table pointers.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55030

---

 src/mesa/drivers/dri/i965/brw_state_cache.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c
index d9bbcd9..d44b2b7 100644
--- a/src/mesa/drivers/dri/i965/brw_state_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_state_cache.c
@@ -336,7 +336,7 @@ brw_init_caches(struct brw_context *brw)
    cache->size = 7;
    cache->n_items = 0;
    cache->items =
-      calloc(1, cache->size * sizeof(struct brw_cache_item));
+      calloc(1, cache->size * sizeof(struct brw_cache_item *));
 
    cache->bo = drm_intel_bo_alloc(intel->bufmgr,
 				  "program cache",




More information about the mesa-commit mailing list