nvk: Fix segfault when opening DRI device file returns error
authorBenjamin Lee <benjamin@computer.surgery>
Fri, 9 Jun 2023 22:22:01 +0000 (15:22 -0700)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:32:05 +0000 (21:32 +0000)
commit354fe8fda01d0803dba918d8e2ca53b07b60b757
tree8515ebaf8fb4629e9e1d438ace2d403d3697f038
parent3572f5cd7e273f101fa36c98dc73b52d5b6be567
nvk: Fix segfault when opening DRI device file returns error

Previously, ver was unitialized on this path, causing UB on the
`if (ver)` branch after the out_err label.

Signed-off-by: Benjamin Lee <benjamin@computer.surgery>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
src/nouveau/winsys/nouveau_device.c