diff options
author | Vinson Lee <vlee@vmware.com> | 2010-02-21 15:10:50 -0800 |
---|---|---|
committer | Vinson Lee <vlee@vmware.com> | 2010-02-21 15:10:50 -0800 |
commit | b7eed19efec0cdaca42cabbc6f9fadcb892aee81 (patch) | |
tree | 4b96efeb0dae91e375da66e85ba256d50ab956e7 /src | |
parent | 8ff6790afb9c1b5a53a22fed9d5159581ba42a8f (diff) |
st/mesa: Fix memory leak on out-of-memory error path.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 7ce3938904..7f8677d400 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -205,8 +205,10 @@ st_translate_vertex_program(struct st_context *st, unsigned num_outputs; ureg = ureg_create( TGSI_PROCESSOR_VERTEX ); - if (ureg == NULL) + if (ureg == NULL) { + FREE(vpv); return NULL; + } vpv->num_inputs = stvp->num_inputs; num_outputs = stvp->num_outputs; |