[PATCH weston 4/4] rpi: prevent Weston segfaulting on shut-down due to NULL `backend`

Pekka Paalanen ppaalanen at gmail.com
Tue Sep 8 06:55:26 PDT 2015


On Sat,  5 Sep 2015 15:01:40 +0100
John Sadler <deathofathousandpapercuts at gmail.com> wrote:

> When running with the RPi backend, Weston sefaults during shutdown. This is
> due to the fact that `compositor->backend` is never initialised, and there
> is no NULL check prior to calling `destroy()`.
> 
> This commit fixes the issue by making `rpi_backend_create()` intialise
> `compositor->backend` - just like the X11 backend does.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91886
> 
> Signed-off-by: John Sadler <deathofathousandpapercuts at gmail.com>
> ---
>  src/compositor-rpi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/compositor-rpi.c b/src/compositor-rpi.c
> index 340a974..3d2e09f 100644
> --- a/src/compositor-rpi.c
> +++ b/src/compositor-rpi.c
> @@ -533,6 +533,8 @@ rpi_backend_create(struct weston_compositor *compositor,
>  		goto out_launcher;
>  	}
>  
> +	compositor->backend = &backend->base;
> +
>  	return backend;
>  
>  out_launcher:

Alright, I had to fix the summary again. Our git-version.h generation
script sucks with quoting. Pushed:
   960b5eb..7628789  master -> master


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150908/7acc6f24/attachment.sig>


More information about the wayland-devel mailing list