summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2013-02-23 16:49:37 -0800
committerVinson Lee <[email protected]>2013-02-26 20:01:58 -0800
commitf88ed1658c666a36a6b42886ee0609858a8fb86e (patch)
tree10d1f4dbb82781349073c1487e7c0e1a2b9a6660 /src
parent112ccfab44eb3e23a516209c3be8b2f0107adb47 (diff)
st/vega: Fix memory leak in combine_shaders.
Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/vega/shaders_cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/vega/shaders_cache.c b/src/gallium/state_trackers/vega/shaders_cache.c
index eceae54051e..c1082ca3673 100644
--- a/src/gallium/state_trackers/vega/shaders_cache.c
+++ b/src/gallium/state_trackers/vega/shaders_cache.c
@@ -225,8 +225,10 @@ combine_shaders(const struct shader_asm_info *shaders[SHADER_STAGES], int num_sh
ureg_END(ureg);
shader->tokens = ureg_finalize(ureg);
- if(!shader->tokens)
+ if (!shader->tokens) {
+ ureg_destroy(ureg);
return NULL;
+ }
p = pipe->create_fs_state(pipe, shader);