From 31631d8515924df0dbaefd8bea3530dc5a4d02c8 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Thu, 21 Apr 2016 20:34:04 +0200 Subject: [PATCH] radeonsi: Fix memory leak in error path. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Nicolai Hähnle Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_compute.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.30.2