[PATCH][weston] ivi_layout_surface_add_notification: Fix potential leak of memory pointed to by 'notification'

Bryce Harrington bryce at osg.samsung.com
Tue Sep 22 17:18:05 PDT 2015


On Sat, Sep 19, 2015 at 06:24:58PM -0300, Lucas Tanure wrote:
> Signed-off-by: Lucas Tanure <tanure at linux.com>

Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>

I notice this patch was marked as Superseded in patchwork, but I didn't
spot a patch superseding it.  So, I've NEW'd it for application since it
still appears to be pertinent.

Thanks,
Bryce

> ---
>  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 24bd8dd..061f156 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;
>  	}
>  
> -- 
> 2.5.3
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list