mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 05:00:09 +01:00
st/mesa: Fix memory leak on out-of-memory error path.
This commit is contained in:
parent
8ff6790afb
commit
b7eed19efe
1 changed files with 3 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue