asahi/virtio: fix memleak

Fixes: c64a2bbff5 ("asahi: port to stable uAPI")
(cherry picked from commit fdef10916e)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38268>
This commit is contained in:
Eric Engestrom 2025-10-29 18:25:03 +01:00 committed by Dylan Baker
parent 205fe1a245
commit 770e095766
2 changed files with 2 additions and 1 deletions

View file

@ -274,7 +274,7 @@
"description": "asahi/virtio: fix memleak",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "c64a2bbff5a3370bca7f40d6c9f41fb3cd6cf4ba",
"notes": null

View file

@ -133,6 +133,7 @@ agx_virtio_bo_bind(struct agx_device *dev, struct drm_asahi_gem_bind_op *ops,
memcpy(req->payload, ops, payload_size);
int ret = vdrm_send_req(dev->vdrm, &req->hdr, false);
free(req);
if (ret) {
fprintf(stderr, "ASAHI_CCMD_GEM_BIND failed: %d\n", ret);
}