mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
mesa: Avoid read of uninitialized variable
The is_color_attachement variable is later read when handling two
separate error cases, where only one of the cases results in the
variable being initialized.
This can be avoided by giving the variable a safe default value.
Coverity-Id: 1398631
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 88becf7302)
This commit is contained in:
parent
cb4798d731
commit
e13a41d91e
1 changed files with 1 additions and 1 deletions
|
|
@ -3628,7 +3628,7 @@ _mesa_get_framebuffer_attachment_parameter(struct gl_context *ctx,
|
|||
GLint *params, const char *caller)
|
||||
{
|
||||
const struct gl_renderbuffer_attachment *att;
|
||||
bool is_color_attachment;
|
||||
bool is_color_attachment = false;
|
||||
GLenum err;
|
||||
|
||||
/* The error code for an attachment type of GL_NONE differs between APIs.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue