[PATCH][weston 2/2] ivi-layout-transition: Fix potential leak of memory pointed to by transition
Bryce Harrington
bryce at osg.samsung.com
Tue Sep 22 14:36:04 PDT 2015
On Mon, Sep 21, 2015 at 02:10:33PM -0300, Lucas Tanure wrote:
> Check if layout_transition_register worked, otherwise destroy transition
>
> Signed-off-by: Lucas Tanure <tanure at linux.com>
> ---
> ivi-shell/ivi-layout-transition.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/ivi-shell/ivi-layout-transition.c b/ivi-shell/ivi-layout-transition.c
> index 8d477b4..b00b589 100644
> --- a/ivi-shell/ivi-layout-transition.c
> +++ b/ivi-shell/ivi-layout-transition.c
> @@ -511,7 +511,8 @@ create_visibility_transition(struct ivi_layout_surface *surface,
> destroy_func,
> duration);
>
> - layout_transition_register(transition);
> + if(!layout_transition_register(transition))
> + layout_transition_destroy(transition);
> }
Do I understand the failure mode correctly that if this fails, it merely
results in the surface being displayed directly, without the transition?
No chance that the surface is left in an inconsistent state, right?
Otherwise, this patchset looks technically fine to me.
Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
> static void
> --
> 2.5.3
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list