[Cogl] [PATCH] texture-rectangle: Initialize is_foreign
Neil Roberts
neil at linux.intel.com
Mon Aug 26 15:24:37 PDT 2013
Oh good catch, thanks! I've pushed it to master and the 1.16 branch.
https://git.gnome.org/browse/cogl/commit/?id=90415aae94957
Regards,
- Neil
Damien Lespiau <damien.lespiau at intel.com> writes:
> So we don't read an initializes value later on. Caught by valgrind:
>
> Conditional jump or move depends on uninitialised value(s)
> _cogl_object_texture_rectangle_indirect_free (cogl-texture-rectangle.c:105)
> _cogl_object_context_indirect_free (cogl-context.c:453)
> ...
> main (text.c:149)
>
> Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
> ---
> cogl/cogl-texture-rectangle.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/cogl/cogl-texture-rectangle.c b/cogl/cogl-texture-rectangle.c
> index d006085..22e5176 100644
> --- a/cogl/cogl-texture-rectangle.c
> +++ b/cogl/cogl-texture-rectangle.c
> @@ -174,6 +174,7 @@ _cogl_texture_rectangle_create_base (CoglContext *ctx,
> _cogl_texture_init (tex, ctx, width, height, &cogl_texture_rectangle_vtable);
>
> tex_rect->gl_texture = 0;
> + tex_rect->is_foreign = FALSE;
>
> /* We default to GL_LINEAR for both filters */
> tex_rect->gl_legacy_texobj_min_filter = GL_LINEAR;
> --
> 1.8.3.1
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
More information about the Cogl
mailing list