meta: Avoid random memory access on error

Initialize drawFb to NULL in _mesa_meta_CopyImageSubData_uncompressed()
if getting readFb fails uninitialized drawFb will cause randomness
on cleanup.

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>
This commit is contained in:
Juha-Pekka Heikkila 2016-04-16 22:26:22 +03:00 committed by Chad Versace
parent cea3a7e615
commit 51632d6f27

View file

@ -168,7 +168,7 @@ _mesa_meta_CopyImageSubData_uncompressed(struct gl_context *ctx,
GLuint src_view_texture = 0;
struct gl_texture_image *src_view_tex_image;
struct gl_framebuffer *readFb;
struct gl_framebuffer *drawFb;
struct gl_framebuffer *drawFb = NULL;
bool success = false;
GLbitfield mask;
GLenum status, attachment;