From 3d066e5ef188cd1f49f5b27627ae9e63a9151011 Mon Sep 17 00:00:00 2001 From: Anil Hiranniah Date: Thu, 17 Oct 2024 09:21:11 +0200 Subject: [PATCH] panfrost: Fix a memory leak in the CSF backend The geometry BO should be released in csf_cleanup_context(). Fixes: 447075eeeef8 ("panfrost: Add support for the CSF job frontend") Reviewed-by: Boris Brezillon Reviewed-by: Erik Faye-Lund Part-of: --- src/gallium/drivers/panfrost/pan_csf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/panfrost/pan_csf.c b/src/gallium/drivers/panfrost/pan_csf.c index 3ad2763f704..b2f056d1329 100644 --- a/src/gallium/drivers/panfrost/pan_csf.c +++ b/src/gallium/drivers/panfrost/pan_csf.c @@ -1206,6 +1206,7 @@ GENX(csf_cleanup_context)(struct panfrost_context *ctx) drmIoctl(panfrost_device_fd(dev), DRM_IOCTL_PANTHOR_GROUP_DESTROY, &gd); assert(!ret); + panfrost_bo_unreference(ctx->csf.tmp_geom_bo); panfrost_bo_unreference(ctx->csf.heap.desc_bo); ctx->csf.is_init = false; }