ivi-layout-transition: Fix potential leak of memory pointed to by transition
authorLucas Tanure <tanure@linux.com>
Wed, 23 Sep 2015 13:33:21 +0000 (10:33 -0300)
committerBryce Harrington <bryce@osg.samsung.com>
Thu, 24 Sep 2015 00:02:28 +0000 (17:02 -0700)
commitc8dcd16b01ea0f5ac8f32ee18374b2ca2694dd6c
treef0d00b5f7b1fd2e68844072ccb386a915aca3aad
parentae5df83f8e029e427f5d587622b3d25b3d1b4964
ivi-layout-transition: Fix potential leak of memory pointed to by transition

Several fixes to handle invalid transition objects:

1. Free transition in ivi_layout_transition_fade_layer if we fail to
   allocate memory for data

2. Check if transition is not null and if layout_transition_register was
   ok before return, if not, free transition

3. Destroy transition if layout_transition_register was not ok, we can't
   just free transition, we need to call layout_transition_destroy in
   order to free private_data from transition

Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
ivi-shell/ivi-layout-transition.c