[PATCH 2/3] xwayland: Check zalloc return for out of memory situation

Kristian Høgsberg hoegsberg at gmail.com
Fri Apr 25 13:21:35 PDT 2014


On Mon, Apr 21, 2014 at 11:51:03PM +0000, Bryce W. Harrington wrote:
> 
> Signed-off-by: Bryce Harrington <b.harrington at samsung.com>
> ---

Applied, thanks.

Kristian

>  xwayland/launcher.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/xwayland/launcher.c b/xwayland/launcher.c
> index ac692de..70703a4 100644
> --- a/xwayland/launcher.c
> +++ b/xwayland/launcher.c
> @@ -348,6 +348,8 @@ module_init(struct weston_compositor *compositor,
>  	char lockfile[256], display_name[8];
>  
>  	wxs = zalloc(sizeof *wxs);
> +	if (wxs == NULL)
> +		return -1;
>  	wxs->process.cleanup = weston_xserver_cleanup;
>  	wxs->wl_display = display;
>  	wxs->compositor = compositor;
> -- 
> 1.7.9.5
> _______________________________________________
> 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