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

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>

---

 src/etnaviv/drm/etnaviv_cmd_stream.c | 2 ++
 1 file changed, 2 insertions(+)

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

Reply via email to