diff options
author | Bas Nieuwenhuizen <[email protected]> | 2016-04-21 20:34:04 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2016-04-26 15:41:19 +0200 |
commit | 31631d8515924df0dbaefd8bea3530dc5a4d02c8 (patch) | |
tree | 23b63350a04769ce73fa209e664a1872c424c606 | |
parent | 514c5b5f4b692e2596341e08797c4f6dc8cdfe00 (diff) |
radeonsi: Fix memory leak in error path.
Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_compute.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index 7e05be55124..09cbe1337ef 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -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; } |