aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-12-07 14:11:01 -0500
committerRob Clark <[email protected]>2018-12-07 14:12:12 -0500
commitd014af98b7afc69f4f733c8b8b6f2e3438e68407 (patch)
tree740152fac0c989d3d7e5f0a2963ce95b00de92b2 /src
parent5c2c1f0a2d5cec771b6cbfadf43f44a632ff57fc (diff)
freedreno/drm: fix memory leak
Fix an emberrasing memory leak with the non-softpin submit/rb implementation. Fixes: f3cc0d27475 freedreno: import libdrm_freedreno + redesign submit Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/freedreno/drm/msm_ringbuffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/freedreno/drm/msm_ringbuffer.c b/src/freedreno/drm/msm_ringbuffer.c
index 673ef436e25..369f26f9837 100644
--- a/src/freedreno/drm/msm_ringbuffer.c
+++ b/src/freedreno/drm/msm_ringbuffer.c
@@ -97,6 +97,7 @@ static void
cmd_free(struct msm_cmd *cmd)
{
fd_bo_del(cmd->ring_bo);
+ free(cmd->relocs);
free(cmd);
}
@@ -653,6 +654,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;
@@ -661,6 +663,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);
}
}