mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
freedreno/drm: fix memory leak
Fix an emberrasing memory leak with the non-softpin submit/rb implementation. Fixes:f3cc0d2747freedreno: import libdrm_freedreno + redesign submit Signed-off-by: Rob Clark <robdclark@gmail.com> (cherry picked from commitd014af98b7)
This commit is contained in:
parent
6d3811d82b
commit
59c37f2988
1 changed files with 3 additions and 0 deletions
|
|
@ -97,6 +97,7 @@ static void
|
|||
cmd_free(struct msm_cmd *cmd)
|
||||
{
|
||||
fd_bo_del(cmd->ring_bo);
|
||||
free(cmd->relocs);
|
||||
free(cmd);
|
||||
}
|
||||
|
||||
|
|
@ -655,6 +656,7 @@ msm_ringbuffer_destroy(struct fd_ringbuffer *ring)
|
|||
|
||||
_mesa_set_destroy(msm_ring->u.ring_set, unref_rings);
|
||||
|
||||
free(msm_ring->u.reloc_bos);
|
||||
free(msm_ring);
|
||||
} else {
|
||||
struct fd_submit *submit = msm_ring->u.submit;
|
||||
|
|
@ -663,6 +665,7 @@ msm_ringbuffer_destroy(struct fd_ringbuffer *ring)
|
|||
cmd_free(msm_ring->u.cmds[i]);
|
||||
}
|
||||
|
||||
free(msm_ring->u.cmds);
|
||||
slab_free_st(&to_msm_submit(submit)->ring_pool, msm_ring);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue