[PATCH][weston] ivi-layout-transition: Fix potential leak of memory pointed to by 'transition'
Lucas Tanure
tanure at linux.com
Sat Sep 19 17:18:07 PDT 2015
Free transition before return. We don't need to use layout_transition_destroy,
because transition was not registered yet.
Signed-off-by: Lucas Tanure <tanure at linux.com>
---
ivi-shell/ivi-layout-transition.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ivi-shell/ivi-layout-transition.c b/ivi-shell/ivi-layout-transition.c
index 8c5c8cb..6370e8f 100644
--- a/ivi-shell/ivi-layout-transition.c
+++ b/ivi-shell/ivi-layout-transition.c
@@ -340,6 +340,7 @@ create_move_resize_view_transition(
data = malloc(sizeof(*data));
if (data == NULL) {
weston_log("%s: memory allocation fails\n", __func__);
+ free(transition);
return NULL;
}
--
2.5.3
More information about the wayland-devel
mailing list