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>
macos/master
Marc-André Lureau 9 years ago committed by Dave Airlie
parent 374dd5bae8
commit 1d2a61788f
  1. 1
      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;

Loading…
Cancel
Save