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@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15010>
This commit is contained in:
Tapani Pälli 2022-02-14 07:40:51 +02:00
parent cb296047f2
commit ecc0041030

View file

@ -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);
}