aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErico Nunes <[email protected]>2019-10-28 20:02:38 +0100
committerErico Nunes <[email protected]>2019-11-07 23:03:01 +0000
commit9817bff4da0af020c9db0b718fb71f65224f100f (patch)
treed884c3366eec9eda59d6662971e9c9ec24a10da0 /src
parentd939f5d463f4e13e6deb78c4f87904fa524755fc (diff)
lima: fix bo submit memory leak
Fix memory leak on allocation for lima submit, reported by valgrind. 128 bytes in 1 blocks are definitely lost in loss record 38 of 84 at 0x484A6E8: realloc (in /usr/lib/valgrind/vgpreload_memcheck-arm64-linux.so) by 0x58689C7: util_dynarray_ensure_cap (u_dynarray.h:91) by 0x5868BBB: util_dynarray_grow_bytes (u_dynarray.h:139) by 0x5868BBB: lima_submit_add_bo (lima_submit.c:113) by 0x585D7D3: lima_ctx_buff_va (lima_context.c:57) by 0x586378F: lima_pack_plbu_cmd (lima_draw.c:802) by 0x586378F: lima_draw_vbo (lima_draw.c:1351) by 0x5406A2F: u_vbuf_draw_vbo (u_vbuf.c:1184) by 0x55D0A57: st_draw_vbo (st_draw.c:268) by 0x55576CB: _mesa_draw_arrays (draw.c:374) by 0x55576CB: _mesa_draw_arrays (draw.c:351) by 0x43610B: Mesh::render_vbo() (mesh.cpp:583) by 0x415DBB: SceneBuild::draw() (scene-build.cpp:242) by 0x41131B: MainLoop::draw() (main-loop.cpp:133) by 0x411947: MainLoop::step() (main-loop.cpp:108) Signed-off-by: Erico Nunes <[email protected]> Reviewed-by: Qiang Yu <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/lima/lima_submit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/lima/lima_submit.c b/src/gallium/drivers/lima/lima_submit.c
index acc73d08054..ff9a4a1a766 100644
--- a/src/gallium/drivers/lima/lima_submit.c
+++ b/src/gallium/drivers/lima/lima_submit.c
@@ -78,6 +78,7 @@ struct lima_submit *lima_submit_create(struct lima_context *ctx, uint32_t pipe)
goto err_out1;
util_dynarray_init(&s->gem_bos, s);
+ util_dynarray_init(&s->bos, s);
return s;