projects
/
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 6c1568dcfa9fcf8eafb9264cbb6470e1f12c3376..e03157940b1f010d871e7cc78b3745afd192acdf 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);