Mesa (master): i965/meta: initialize values to avoid random behaviour on error path
Chad Versace
chadversary at kemper.freedesktop.org
Tue Apr 26 20:52:49 UTC 2016
Module: Mesa
Branch: master
Commit: ec5f7fc7bd1104700738f27f0e79269fe3ab4072
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec5f7fc7bd1104700738f27f0e79269fe3ab4072
Author: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Date: Sat Apr 16 22:26:23 2016 +0300
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 <juhapekka.heikkila at gmail.com>
Reviewed-by: Eduardo Lima Mitev <elima at igalia.com>
Reviewed-by: Chad Versace <chad.versace at intel.com>
---
src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 7e04248..3cad165 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()
More information about the mesa-commit
mailing list