projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ca6faa
)
radv: Only close local_fd when valid
author
James Park
<jpark37@lagfreegames.com>
Sat, 29 Aug 2020 18:35:29 +0000
(11:35 -0700)
committer
Marge Bot
<eric+marge@anholt.net>
Tue, 13 Oct 2020 22:56:31 +0000
(22:56 +0000)
Necessary when drm_device is bypassed.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7119>
src/amd/vulkan/radv_device.c
patch
|
blob
|
history
diff --git
a/src/amd/vulkan/radv_device.c
b/src/amd/vulkan/radv_device.c
index
a85242a
..
4574465
100644
(file)
--- a/
src/amd/vulkan/radv_device.c
+++ b/
src/amd/vulkan/radv_device.c
@@
-466,7
+466,8
@@
radv_physical_device_destroy(struct radv_physical_device *device)
radv_finish_wsi(device);
device->ws->destroy(device->ws);
disk_cache_destroy(device->disk_cache);
- close(device->local_fd);
+ if (device->local_fd != -1)
+ close(device->local_fd);
if (device->master_fd != -1)
close(device->master_fd);
vk_free(&device->instance->alloc, device);