Mesa (main): iris: fix a leak on surface states

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Feb 15 05:50:21 UTC 2022


Module: Mesa
Branch: main
Commit: ecc00410302cae4e22ad7718a531f03658190389
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ecc00410302cae4e22ad7718a531f03658190389

Author: Tapani Pälli <tapani.palli at intel.com>
Date:   Mon Feb 14 07:40:51 2022 +0200

iris: fix a leak on surface states

Cc: mesa-stable
Closes:https://gitlab.freedesktop.org/mesa/mesa/-/issues/6013

Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15010>

---

 src/gallium/drivers/iris/iris_state.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c
index e7765abb6aa..18929700014 100644
--- a/src/gallium/drivers/iris/iris_state.c
+++ b/src/gallium/drivers/iris/iris_state.c
@@ -3044,6 +3044,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);
 }
 



More information about the mesa-commit mailing list