From: Juha-Pekka Heikkila Date: Sat, 16 Apr 2016 19:26:23 +0000 (+0300) Subject: i965/meta: initialize values to avoid random behaviour on error path X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec5f7fc7bd1104700738f27f0e79269fe3ab4072;p=mesa.git i965/meta: initialize values to avoid random behaviour on error path if brw_meta_stencil_blit() errored at wrong place 'target' would be uninitialized and cause random behaviour on leaving the funtion. Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Eduardo Lima Mitev Reviewed-by: Chad Versace --- diff --git a/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c b/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c index 7e0424846a5..3cad1658d63 100644 --- a/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c +++ b/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c @@ -433,7 +433,7 @@ brw_meta_stencil_blit(struct brw_context *brw, struct gl_shader_program *prog; struct gl_framebuffer *drawFb = NULL; struct gl_renderbuffer *rb = NULL; - GLenum target; + GLenum target = 0; _mesa_meta_fb_tex_blit_begin(ctx, &blit); /* XXX: Pretend to support stencil textures so _mesa_base_tex_format()