vulkan: the index in ggml_vk_host_free could be uinitialized if pinned_memory.size() is zero
This commit is contained in:
parent
dd3a6ce9f8
commit
6beb50dbf6
1 changed files with 1 additions and 1 deletions
|
@ -2208,7 +2208,7 @@ static void ggml_vk_host_free(vk_device& device, void* ptr) {
|
|||
}
|
||||
VK_LOG_MEMORY("ggml_vk_host_free(" << ptr << ")");
|
||||
vk_buffer buf;
|
||||
size_t index;
|
||||
size_t index = 0;
|
||||
for (size_t i = 0; i < device->pinned_memory.size(); i++) {
|
||||
const uint8_t* addr = (const uint8_t*) std::get<0>(device->pinned_memory[i]);
|
||||
const uint8_t* endr = addr + std::get<1>(device->pinned_memory[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue