radv/virtio: don't leak drm FD when using vpipe
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

The fd in radv_physical_device_try_create is one we opened in that function.
We don't need it when vpipe is in use, so we should close it,
before setting it to -1.

Fixes: 999d5098b4 ("radv/virtio: support vpipe")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35947>
This commit is contained in:
Wolf480pl 2025-07-04 23:07:41 +02:00 committed by Marge Bot
parent a1466b762d
commit 62b3fd0a5e

View file

@ -2105,6 +2105,7 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm
#ifdef HAVE_AMDGPU_VIRTIO
if (debug_get_bool_option("AMD_FORCE_VPIPE", false)) {
is_virtio = true;
close(fd);
fd = -1;
}
#endif