From 0410054459e80e673e6ef3279199c5ed925f8143 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Wed, 3 May 2023 13:42:48 -0700 Subject: [PATCH] nouveau/winsys: Fix an undefined use in the error path. Part-of: --- src/nouveau/winsys/nouveau_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nouveau/winsys/nouveau_device.c b/src/nouveau/winsys/nouveau_device.c index 1c246bae45c..6a06449636f 100644 --- a/src/nouveau/winsys/nouveau_device.c +++ b/src/nouveau/winsys/nouveau_device.c @@ -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;