From 50b07057cec3383bd016e1b792266c9a7d465bd2 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Nov 03 2025 12:07:55 +0000 Subject: Fix asahi virtio memleak https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38149 --- diff --git a/mesa.spec b/mesa.spec index 915fab2..1699c54 100644 --- a/mesa.spec +++ b/mesa.spec @@ -109,7 +109,7 @@ Summary: Mesa graphics libraries %global ver 25.2.5 Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} # Keep `Release` smaller than 1 so that the Fedora packages always win version comparisons -Release: 0.102%{?dist} +Release: 0.103%{?dist} License: MIT AND BSD-3-Clause AND SGI-B-2.0 URL: http://www.mesa3d.org @@ -125,6 +125,7 @@ Patch20: meson_1.5_rust_build.patch Patch21: do_not_use_wl_display_dispatch_queue_timeout.diff Patch22: mesa_mr_38160_asahi_fix_multiplane.patch Patch23: mesa_mr_38200_hk_fix_multiplane.patch +Patch24: mesa_mr_38149_asahi_virtio-memleak.patch %if 0%{?fedora} && 0%{?fedora} < 42 BuildRequires: meson >= 1.5.0 diff --git a/mesa_mr_38149_asahi_virtio-memleak.patch b/mesa_mr_38149_asahi_virtio-memleak.patch new file mode 100644 index 0000000..d95bf90 --- /dev/null +++ b/mesa_mr_38149_asahi_virtio-memleak.patch @@ -0,0 +1,26 @@ +From fdef10916ee61e4440189b9fad5d09c6295b7a71 Mon Sep 17 00:00:00 2001 +From: Eric Engestrom +Date: Wed, 29 Oct 2025 18:25:03 +0100 +Subject: [PATCH] asahi/virtio: fix memleak + +Fixes: c64a2bbff5a3370bca7f ("asahi: port to stable uAPI") +Part-of: +--- + src/asahi/lib/agx_device_virtio.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/asahi/lib/agx_device_virtio.c b/src/asahi/lib/agx_device_virtio.c +index e245c0c7c97c5..27fc522d9999b 100644 +--- a/src/asahi/lib/agx_device_virtio.c ++++ b/src/asahi/lib/agx_device_virtio.c +@@ -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); + } +-- +GitLab +