diff --git a/.pick_status.json b/.pick_status.json index 623d2f3ca69..7066b4d2bbf 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1674,7 +1674,7 @@ "description": "llvmpipe: add a missing alloc error handling in fd import", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "d74ea2c117fe96e527471e572336f931c3c77da1", "notes": null diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index 2a74a5d675d..0cd151459f6 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -1485,6 +1485,9 @@ llvmpipe_import_memory_fd(struct pipe_screen *screen, bool dmabuf) { struct llvmpipe_memory_allocation *alloc = CALLOC_STRUCT(llvmpipe_memory_allocation); + if (!alloc) + return false; + alloc->mem_fd = -1; alloc->dmabuf_fd = -1; #if defined(HAVE_LIBDRM) && defined(HAVE_LINUX_UDMABUF_H)