pipe-loader: check that the pointer to driconf_xml isn't NULL
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 20 Nov 2019 08:14:17 +0000 (09:14 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 21 Nov 2019 06:34:20 +0000 (07:34 +0100)
commit8fc8e8e8be787173f41e8256b9068322f8f3d78d
tree1f709bc4d5de7e89014340bf3eba744138947604
parent046097c0929aeb57aab4d8abca5827b1a5edd79a
pipe-loader: check that the pointer to driconf_xml isn't NULL

This happens when mesa is built with only swrast. The default
driver being kmsro and the default driconf file being v3d,
it's NULL and then strdup crashes.

This fixes a crash with piglit spec/egl_mesa_query_driver/conformance.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c