Update the Vulkan loader to the latest version
This commit is contained in:
16
third_party/vulkan/loader/dirent_on_windows.c
vendored
16
third_party/vulkan/loader/dirent_on_windows.c
vendored
@@ -36,9 +36,9 @@ DIR *opendir(const char *name) {
|
||||
const char *all = /* search pattern must end with suitable wildcard */
|
||||
strchr("/\\", name[base_length - 1]) ? "*" : "/*";
|
||||
|
||||
if ((dir = (DIR *)loader_tls_heap_alloc(sizeof *dir)) != 0 &&
|
||||
(dir->name = (char *)loader_tls_heap_alloc(base_length +
|
||||
strlen(all) + 1)) != 0) {
|
||||
if ((dir = (DIR *)loader_instance_tls_heap_alloc(sizeof *dir)) != 0 &&
|
||||
(dir->name = (char *)loader_instance_tls_heap_alloc(
|
||||
base_length + strlen(all) + 1)) != 0) {
|
||||
strcat(strcpy(dir->name, name), all);
|
||||
|
||||
if ((dir->handle =
|
||||
@@ -46,13 +46,13 @@ DIR *opendir(const char *name) {
|
||||
dir->result.d_name = 0;
|
||||
} else /* rollback */
|
||||
{
|
||||
loader_tls_heap_free(dir->name);
|
||||
loader_tls_heap_free(dir);
|
||||
loader_instance_tls_heap_free(dir->name);
|
||||
loader_instance_tls_heap_free(dir);
|
||||
dir = 0;
|
||||
}
|
||||
} else /* rollback */
|
||||
{
|
||||
loader_tls_heap_free(dir);
|
||||
loader_instance_tls_heap_free(dir);
|
||||
dir = 0;
|
||||
errno = ENOMEM;
|
||||
}
|
||||
@@ -71,8 +71,8 @@ int closedir(DIR *dir) {
|
||||
result = _findclose(dir->handle);
|
||||
}
|
||||
|
||||
loader_tls_heap_free(dir->name);
|
||||
loader_tls_heap_free(dir);
|
||||
loader_instance_tls_heap_free(dir->name);
|
||||
loader_instance_tls_heap_free(dir);
|
||||
}
|
||||
|
||||
if (result == -1) /* map all errors to EBADF */
|
||||
|
||||
Reference in New Issue
Block a user