Mesa (gallium-0.2): intel: Don' t steal renderbuffer from caller in intel_miptree_create_for_region

Alan Hourihane alanh at kemper.freedesktop.org
Mon Dec 15 11:17:00 UTC 2008


Module: Mesa
Branch: gallium-0.2
Commit: e72a44215312ae1f3c812ba28e47b4aec3589de9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e72a44215312ae1f3c812ba28e47b4aec3589de9

Author: Pierre Willenbrock <pierre at pirsoft.de>
Date:   Fri Dec 12 21:18:23 2008 +0100

intel: Don't steal renderbuffer from caller in intel_miptree_create_for_region

Fixes double-frees of some regions, once from the renderbuffer code and
once from the miptree itself.

Bug #19062

---

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

diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index c677ddd..bf1c3f0 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -163,7 +163,7 @@ intel_miptree_create_for_region(struct intel_context *intel,
    mt->pitch = region->pitch;
 #endif
 
-   mt->region = region;
+   intel_region_reference(&mt->region, region);
 
    return mt;
  }




More information about the mesa-commit mailing list