etnaviv: Destroy rsc->pending_ctx set in etna_resource_destroy()
authorMarek Vasut <marex@denx.de>
Thu, 30 Jan 2020 00:40:31 +0000 (01:40 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 4 Feb 2020 06:27:19 +0000 (06:27 +0000)
commitc32bd325e7688c781b7e5de58a2d0534c82f00a0
tree3c9ce050ece94a516bf318c7dffa292e2b577f66
parentdf6a2a719798d706d60b508106da363311a43469
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: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3633>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3633>
src/gallium/drivers/etnaviv/etnaviv_resource.c