nouveau/winsys: Fix an undefined use in the error path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Emma Anholt 2023-05-03 13:42:48 -07:00 committed by Marge Bot
parent 820c03ebee
commit 0410054459

View file

@ -191,7 +191,7 @@ nouveau_ws_device_new(drmDevicePtr drm_device)
int fd = open(path, O_RDWR | O_CLOEXEC);
if (fd < 0)
goto out_err;
goto out_open;
ver = drmGetVersion(fd);
if (!ver)
@ -275,6 +275,7 @@ nouveau_ws_device_new(drmDevicePtr drm_device)
out_err:
if (ver)
drmFreeVersion(ver);
out_open:
FREE(device);
close(fd);
return NULL;