ivi-layout-transition: Fix potential leak of memory pointed to by transition

Check if layout_transition_register worked, otherwise destroy transition

Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
dev
Lucas Tanure 9 years ago committed by Bryce Harrington
parent 9b5fe423bf
commit 96db07741f
  1. 3
      ivi-shell/ivi-layout-transition.c

@ -511,7 +511,8 @@ create_visibility_transition(struct ivi_layout_surface *surface,
destroy_func, destroy_func,
duration); duration);
layout_transition_register(transition); if(!layout_transition_register(transition))
layout_transition_destroy(transition);
} }
static void static void

Loading…
Cancel
Save