Module: Mesa Branch: staging/22.3 Commit: 89ee88a155f3d3e7870b7401b8064c32e9250064 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=89ee88a155f3d3e7870b7401b8064c32e9250064
Author: Lucas Stach <[email protected]> Date: Thu Jan 26 12:38:35 2023 +0100 etnaviv: drm: fix BO array leaks Free the both arrays tracking BOs when the etna_cmd_stream is destroyed. CC: mesa-stable Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20940> (cherry picked from commit 3156b15f70c83d954db9d8ffac90988c7b71a194) --- .pick_status.json | 2 +- src/etnaviv/drm/etnaviv_cmd_stream.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 2484994f41c..809130cb346 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -31,7 +31,7 @@ "description": "etnaviv: drm: fix BO array leaks", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/etnaviv/drm/etnaviv_cmd_stream.c b/src/etnaviv/drm/etnaviv_cmd_stream.c index 3630d155d76..657ef0c0514 100644 --- a/src/etnaviv/drm/etnaviv_cmd_stream.c +++ b/src/etnaviv/drm/etnaviv_cmd_stream.c @@ -135,6 +135,8 @@ void etna_cmd_stream_del(struct etna_cmd_stream *stream) _mesa_hash_table_destroy(priv->bo_table, NULL); free(stream->buffer); + free(priv->bos); + free(priv->submit.bos); free(priv->submit.relocs); free(priv->submit.pmrs); free(priv);
