mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-10 11:50:30 +01:00
gfxstream: Use os_get_option_dup(VK_DRIVER_FILES)
As the return value os_get_option should be immediately consumed. Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Gurchetan Singh <gurchetansingh@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38687>
This commit is contained in:
parent
d668c0ad42
commit
6356efc4e0
1 changed files with 2 additions and 1 deletions
|
|
@ -208,7 +208,7 @@ GfxStreamVulkanMapper* GfxStreamVulkanMapper::getInstance(std::optional<DeviceId
|
|||
// testing, VK_DRIVER_FILES shouldn't be defined. For deqp-vk, this is
|
||||
// useful, but not safe for multi-threaded tests. For now, since this is only
|
||||
// used for end2end tests, we should be good.
|
||||
const char* driver = os_get_option(VK_DRIVER_FILES);
|
||||
char* driver = os_get_option_dup(VK_DRIVER_FILES);
|
||||
|
||||
// HACK: Need equivalents on Windows
|
||||
#if DETECT_OS_LINUX
|
||||
|
|
@ -225,6 +225,7 @@ GfxStreamVulkanMapper* GfxStreamVulkanMapper::getInstance(std::optional<DeviceId
|
|||
setenv(VK_DRIVER_FILES, driver, 1);
|
||||
}
|
||||
#endif
|
||||
free(driver);
|
||||
}
|
||||
|
||||
return sVkMapper.get();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue