ivi_layout_surface_add_notification: Fix potential leak of memory pointed to by ...
authorLucas Tanure <tanure@linux.com>
Sat, 19 Sep 2015 21:24:58 +0000 (18:24 -0300)
committerBryce Harrington <bryce@osg.samsung.com>
Wed, 23 Sep 2015 00:18:32 +0000 (17:18 -0700)
Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
ivi-shell/ivi-layout.c

index 24bd8dd6711335ccc303d009245381424cd8fdc3..061f15636bda74f89c459a72d64054245434ca49 100644 (file)
@@ -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;
        }