xserver/hw/xwayland
Olivier Fourdan d9ec525059 xwayland: Do not free a NULL GBM bo
Both `gbm_bo_create()` and `gbm_bo_create_with_modifiers()` can fail and
return `NULL`.

If that occurs, `xwl_glamor_gbm_create_pixmap()` will not create a
pixmap for the (NULL) GBM bo, but would still try to free the bo which
leads to a crash in mesa:

  [...]
  #7  <signal handler called>
  #8  in gbm_bo_destroy (bo=0x0) at ../src/gbm/main/gbm.c:439
  #9  in xwl_glamor_gbm_create_pixmap () at xwayland-glamor-gbm.c:245
  #10 in ProcCreatePixmap () at dispatch.c:1440
  #11 in Dispatch () at dispatch.c:478
  #12 in dix_main () at main.c:276

To avoid the crash, only free the GBM bo if not `NULL`.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Bugzilla: https://bugzilla.redhat.com/1729925
2019-07-23 11:58:36 +02:00
..
.gitignore glamor: Implement PixmapFromBuffers and BuffersFromPixmap 2018-03-05 13:27:49 -05:00
Makefile.am xwayland: Add EGL-backed GLX provider 2019-05-23 12:39:39 -04:00
drm.xml wayland: Sync drm.xml with Mesa 2017-07-05 10:13:04 -04:00
meson.build xwayland: Add EGL-backed GLX provider 2019-05-23 12:39:39 -04:00
xwayland-cursor.c xwayland: Reset scheduled frames after hiding tablet cursor 2019-06-06 09:37:18 +00:00
xwayland-cvt.c xwayland: Add hack for FWXGA resolution #99574 2017-02-08 12:32:16 -05:00
xwayland-glamor-eglstream.c xwayland: fix a realloc OOM error case 2018-10-16 10:37:16 +10:00
xwayland-glamor-gbm.c xwayland: Do not free a NULL GBM bo 2019-07-23 11:58:36 +02:00
xwayland-glamor-xv.c xwayland: use the lowercase xnf.*alloc API 2017-09-06 08:56:39 +10:00
xwayland-glamor.c xwayland: Add EGL-backed GLX provider 2019-05-23 12:39:39 -04:00
xwayland-glx.c xwayland-glx: Fix GLX visual mask setup 2019-06-18 14:57:16 -04:00
xwayland-input.c xwayland: Avoid a crash on pointer enter with a grab 2019-05-20 07:05:37 +00:00
xwayland-output.c xwayland: Expand the RANDR screen size limits 2019-07-16 12:58:03 -04:00
xwayland-present.c xwayland/present: Destroy sync_callback in xwl_present_cleanup 2019-03-13 10:36:11 +01:00
xwayland-shm.c xserver: Check the right HAVE_*_CONFIG_H. 2017-03-23 13:17:39 -04:00
xwayland-vidmode.c xwayland: Pretend we support viewport in vidmode 2016-03-28 14:10:59 -04:00
xwayland.c xwayland: Add "-listenfd" option 2019-06-19 22:03:50 +00:00
xwayland.h xwayland: Add EGL-backed GLX provider 2019-05-23 12:39:39 -04:00