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