xserver/hw
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
..
dmx hw/dmx/glxProxy/glxcmds.c CreateContext(): free glxc->real_ids and glxc in a couple of error branches, per complaints from cppcheck. 2019-05-01 15:22:15 -07:00
kdrive ephyr: fix typo: rquires -> requires 2019-04-19 22:13:46 -03:00
vfb Xvfb: set rotations ret value 2019-07-22 12:47:57 +02:00
xfree86 hw: Rename boolean config value field from bool to boolean 2019-07-22 20:28:27 -04:00
xnest Add ddxInputThread call from os layer into ddx layer 2019-02-25 15:48:03 +00:00
xquartz assert(a && b) --> assert(a); assert(b) 2019-05-02 15:02:36 -07:00
xwayland xwayland: Do not free a NULL GBM bo 2019-07-23 11:58:36 +02:00
xwin hw: Rename boolean config value field from bool to boolean 2019-07-22 20:28:27 -04:00
Makefile.am Xwayland DDX 2014-04-03 15:19:22 -07:00
meson.build meson: Move Xvfb build under an option. 2017-09-20 13:19:21 -04:00