From f3cfbbd4575369e2f8c19deb1720be04bbb59200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Mon, 14 Feb 2022 07:40:51 +0200 Subject: [PATCH] iris: fix a leak on surface states MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: mesa-stable Closes:https://gitlab.freedesktop.org/mesa/mesa/-/issues/6013 Signed-off-by: Tapani Pälli Reviewed-by: Nanley Chery Reviewed-by: Kenneth Graunke Part-of: (cherry picked from commit ecc00410302cae4e22ad7718a531f03658190389) --- .pick_status.json | 2 +- src/gallium/drivers/iris/iris_state.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 34e872d7d82..fc94839d5c5 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2470,7 +2470,7 @@ "description": "iris: fix a leak on surface states", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index e4c4f7095e6..40dc2d062d1 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -2934,6 +2934,7 @@ iris_surface_destroy(struct pipe_context *ctx, struct pipe_surface *p_surf) pipe_resource_reference(&surf->surface_state.ref.res, NULL); pipe_resource_reference(&surf->surface_state_read.ref.res, NULL); free(surf->surface_state.cpu); + free(surf->surface_state_read.cpu); free(surf); }