diff --git a/.pick_status.json b/.pick_status.json index 132fbebfceb..114e1d6fa9f 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1014,7 +1014,7 @@ "description": "panfrost: do not deref potentially null pointer", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "f94889d0797f6dc66b7875e68ae7d44c0f018131", "notes": null diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c index e43c23da76d..d90baa92535 100644 --- a/src/gallium/drivers/panfrost/pan_resource.c +++ b/src/gallium/drivers/panfrost/pan_resource.c @@ -725,13 +725,14 @@ panfrost_resource_create_with_modifier(struct pipe_screen *screen, } assert(handle.type == WINSYS_HANDLE_TYPE_FD); so->bo = panfrost_bo_import(dev, handle.handle); - so->image.data.base = so->bo->ptr.gpu; close(handle.handle); if (!so->bo) { free(so); return NULL; } + + so->image.data.base = so->bo->ptr.gpu; } else { /* We create a BO immediately but don't bother mapping, since we don't * care to map e.g. FBOs which the CPU probably won't touch */