aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2020-01-30 01:40:31 +0100
committerMarge Bot <[email protected]>2020-02-04 06:27:19 +0000
commitc32bd325e7688c781b7e5de58a2d0534c82f00a0 (patch)
tree3c9ce050ece94a516bf318c7dffa292e2b577f66 /src
parentdf6a2a719798d706d60b508106da363311a43469 (diff)
etnaviv: Destroy rsc->pending_ctx set in etna_resource_destroy()
Destroy rsc->pending_ctx set in etna_resource_destroy(), otherwise the memory is allocated, never free'd, and becomes unreachable. This fixes a memory leak. Fixes: 9e672e4d20fb ("etnaviv: keep references to pending resources") Cc: <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3633> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3633>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_resource.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c
index 03b3ef8719e..4a992b5f668 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
@@ -464,6 +464,7 @@ etna_resource_destroy(struct pipe_screen *pscreen, struct pipe_resource *prsc)
struct etna_resource *rsc = etna_resource(prsc);
assert(!_mesa_set_next_entry(rsc->pending_ctx, NULL));
+ _mesa_set_destroy(rsc->pending_ctx, NULL);
if (rsc->bo)
etna_bo_del(rsc->bo);