[PATCH weston 4/8] compositor-drm: Prevent a crash in the pixman renderer
Quentin Glidic
sardemff7+wayland at sardemff7.net
Tue May 3 13:08:37 UTC 2016
On 02/05/2016 23:40, Emmanuel Gil Peyrot wrote:
> When pixman is used and no connector could be found (or any other
> error), drm_backend_create() tried to destroy a gbm_device that would
> only be created in init_egl(), resulting in a segfault.
>
> Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot at collabora.com>
> ---
> src/compositor-drm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/compositor-drm.c b/src/compositor-drm.c
> index c11562f..f9a997b 100644
> --- a/src/compositor-drm.c
> +++ b/src/compositor-drm.c
> @@ -3227,7 +3227,8 @@ err_drm_source:
> err_udev_input:
> udev_input_destroy(&b->input);
> err_sprite:
> - gbm_device_destroy(b->gbm);
> + if (b->gbm)
> + gbm_device_destroy(b->gbm);
> destroy_sprites(b);
> err_udev_dev:
> udev_device_unref(drm_device);
>
Reviewed-by: Quentin Glidic <sardemff7+git at sardemff7.net>
Should land on its own.
--
Quentin “Sardem FF7” Glidic
More information about the wayland-devel
mailing list