Free the memory allocated for cmds/reloc_bos array when destoying the
associated ringbuffer.
For similar fix for the non-softpin implementation see:
https://gitlab.freedesktop.org/mesa/mesa/commit/
d014af98b7afc69f4f733c8b8b6f2e3438e68407
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2324
Fixes: f3cc0d2 ("freedreno: import libdrm_freedreno + redesign submit")
Signed-off-by: Lasse Lopperi <lasse.lopperi@ge.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3342>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3342>
for (unsigned i = 0; i < msm_ring->u.nr_reloc_bos; i++) {
fd_bo_del(msm_ring->u.reloc_bos[i].bo);
}
+ free(msm_ring->u.reloc_bos);
free(msm_ring);
} else {
for (unsigned i = 0; i < msm_ring->u.nr_cmds; i++) {
fd_bo_del(msm_ring->u.cmds[i].ring_bo);
}
+ free(msm_ring->u.cmds);
slab_free(&to_msm_submit_sp(submit)->ring_pool, msm_ring);
}