projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93dae67
)
intel: Fix memory leak in event of mip tree allocation failure
author
Vinson Lee
<vlee@vmware.com>
Wed, 28 Oct 2009 17:09:50 +0000
(11:09 -0600)
committer
Brian Paul
<brianp@vmware.com>
Wed, 28 Oct 2009 17:10:14 +0000
(11:10 -0600)
Signed-off-by: Brian Paul <brianp@vmware.com>
src/mesa/drivers/dri/intel/intel_mipmap_tree.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 0589d82db2524a5b5a228cf125db4ddd7b0f2593..459e8fbd4b858719d5c045bfb59e6f615ccbcf68 100644
(file)
--- a/
src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/
src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@
-134,8
+134,10
@@
intel_miptree_create(struct intel_context *intel,
/*
* pitch == 0 || height == 0 indicates the null texture
*/
- if (!mt || !mt->pitch || !mt->total_height)
+ if (!mt || !mt->pitch || !mt->total_height) {
+ free(mt);
return NULL;
+ }
mt->region = intel_region_alloc(intel,
tiling,