mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 21:20:14 +01:00
radeonsi: Fix memory leak in error path.
Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
514c5b5f4b
commit
31631d8515
1 changed files with 2 additions and 0 deletions
|
|
@ -70,6 +70,7 @@ static void *si_create_compute_state(
|
|||
|
||||
sel.tokens = tgsi_dup_tokens(cso->prog);
|
||||
if (!sel.tokens) {
|
||||
FREE(program);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -84,6 +85,7 @@ static void *si_create_compute_state(
|
|||
if (si_shader_create(sscreen, sctx->tm, &program->shader,
|
||||
&sctx->b.debug)) {
|
||||
FREE(sel.tokens);
|
||||
FREE(program);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue