From 193c7a54a82995c87cdded798dc7db33c90763de Mon Sep 17 00:00:00 2001 From: Lucas Tanure Date: Sat, 19 Sep 2015 18:24:58 -0300 Subject: [PATCH] ivi_layout_surface_add_notification: Fix potential leak of memory pointed to by 'notification' Signed-off-by: Lucas Tanure Reviewed-by: Bryce Harrington --- ivi-shell/ivi-layout.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index 24bd8dd67..061f15636 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -1532,6 +1532,7 @@ ivi_layout_surface_add_notification(struct ivi_layout_surface *ivisurf, prop_callback = malloc(sizeof *prop_callback); if (prop_callback == NULL) { weston_log("fails to allocate memory\n"); + free(notification); return IVI_FAILED; }