summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-02-17 21:56:44 +0100
committerDave Airlie <airlied@redhat.com>2016-02-18 09:59:17 +1000
commit1d2a61788f8c16d17f58d498bc56f949cb3625a0 (patch)
tree5c83371bc368d50121be241703aac3cd6a6b1e65
parent374dd5bae8150f62c0f58cae4ad0c2958fa7f169 (diff)
Fix potential leak in fill_interpolants()
Fix found thanks to AddressSanitizer & piglit glsl-1.50/execution/built-in-functions/gs-pow-vec3-vec3.shader_test. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-rw-r--r--src/vrend_shader.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vrend_shader.c b/src/vrend_shader.c
index a588a29..0389f3f 100644
--- a/src/vrend_shader.c
+++ b/src/vrend_shader.c
@@ -2258,6 +2258,7 @@ static boolean fill_interpolants(struct dump_ctx *ctx, struct vrend_shader_info
if (ctx->prog_type == TGSI_PROCESSOR_VERTEX || ctx->prog_type == TGSI_PROCESSOR_GEOMETRY)
return TRUE;
+ free(sinfo->interpinfo);
sinfo->interpinfo = calloc(ctx->num_interps, sizeof(struct vrend_interp_info));
if (!sinfo->interpinfo)
return FALSE;