gbm: fix potential NULL deref of mapImage/unmapImage.
authorChuanbo Weng <chuanbo.weng@intel.com>
Tue, 6 Sep 2016 09:28:43 +0000 (17:28 +0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 12 Sep 2016 15:52:55 +0000 (16:52 +0100)
commit9a1eb5423722955bee5c5b5f48fb058f0884fab0
tree0fba8124ce362e3062e8a8144c5195938ced62ee
parent63faf7de619be093c883318e90b5e317b9cb0eb1
gbm: fix potential NULL deref of mapImage/unmapImage.

The mapImage/unmapImage functions of DRIimage extension can be NULL,
so we should add additional check for them.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/gbm/backends/dri/gbm_dri.c