i965/meta: initialize values to avoid random behaviour on error path
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Sat, 16 Apr 2016 19:26:23 +0000 (22:26 +0300)
committerChad Versace <chad.versace@intel.com>
Tue, 26 Apr 2016 21:54:29 +0000 (14:54 -0700)
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 <juhapekka.heikkila@gmail.com>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c

index 7e0424846a5bc58ffb6600720859d8b06655a5ac..3cad1658d63f172164d0395d5d04d54320c6df8b 100644 (file)
@@ -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()