OSDN Git Service
(root)
/
android-x86
/
external-mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4515d1
)
st/mesa: Fix memory leak on error path.
author
Vinson Lee
<vlee@vmware.com>
Sun, 6 Nov 2011 05:36:08 +0000
(22:36 -0700)
committer
Vinson Lee
<vlee@vmware.com>
Tue, 8 Nov 2011 04:41:21 +0000
(20:41 -0800)
Fixes Coverity resource leak defect.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/mesa/state_tracker/st_program.c
patch
|
blob
|
history
diff --git
a/src/mesa/state_tracker/st_program.c
b/src/mesa/state_tracker/st_program.c
index
6c1568d
..
e031579
100644
(file)
--- a/
src/mesa/state_tracker/st_program.c
+++ b/
src/mesa/state_tracker/st_program.c
@@
-636,8
+636,10
@@
st_translate_fragment_program(struct st_context *st,
}
ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT );
- if (ureg == NULL)
+ if (ureg == NULL) {
+ FREE(variant);
return NULL;
+ }
if (ST_DEBUG & DEBUG_MESA) {
_mesa_print_program(&stfp->Base.Base);