diff --git a/.pick_status.json b/.pick_status.json index 640c11fd3d7..2c2f16137f2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -5524,7 +5524,7 @@ "description": "lavapipe: do not close import fd on error and amend an error code", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "895d3399f7fb5cf58aa857fb2b98f23fe89071ba", "notes": null diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c index dcf4e04093b..5078f816a37 100644 --- a/src/gallium/frontends/lavapipe/lvp_device.c +++ b/src/gallium/frontends/lavapipe/lvp_device.c @@ -2002,13 +2002,12 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_AllocateMemory( bool dmabuf = import_info->handleType == VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT; uint64_t size; if(!device->pscreen->import_memory_fd(device->pscreen, import_info->fd, &mem->pmem, &size, dmabuf)) { - close(import_info->fd); error = VK_ERROR_INVALID_EXTERNAL_HANDLE; goto fail; } if(size < pAllocateInfo->allocationSize) { device->pscreen->free_memory_fd(device->pscreen, mem->pmem); - close(import_info->fd); + error = VK_ERROR_INVALID_EXTERNAL_HANDLE; goto fail; } if (export_info && export_info->handleTypes == import_info->handleType) {