[PATCH][weston] ivi-shell: initialize all fields in create_layout_transition

Bryce Harrington bryce at osg.samsung.com
Tue Sep 22 18:18:44 PDT 2015

On Tue, Sep 22, 2015 at 02:13:37AM +0200, John-John Tedro wrote:
> On Mon, Sep 21, 2015 at 09:33:29AM -0700, Bill Spitzak wrote:
> >=20
> > Maybe this should be using xzalloc, that seems to be the standard method =
> in
> > Weston
> Yikes.
> It looks like create_move_resize_view_transition (and others?) returns
> NULL on allocation failures, which is fed unchecked into
> layout_transition_register.
> This will cause it to end up in
> layout->transitions->transition_list where it will cause all kinds of
> problems.

Yep, you're right.

ivi_layout_transition_fade_layer() checks for null before making the
call, but this also needs done in create_visibility_transition(),
ivi_layout_transition_move_resize_view(), and
ivi_layout_transition_move_layer().  Or alternatively,
layout_transition_register() could check its input for null and return
false.  Either way, all callers of layout_transition_register() should
also be checking its return value and doing whatever should be done in

Anyone want to send in some follow up's here?


More information about the wayland-devel mailing list