lima: fix dynarray usage in lima_submit_add_bo

Commit de8a919702 refactored dynarray usage and changed the size of the
allocation in lima_submit_add_bo.
That causes a segfault in programs running with lima.
This commit restores the allocation size back to the previous size.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
This commit is contained in:
Erico Nunes
2019-06-14 12:28:55 +02:00
parent 9ab8d31f32
commit 3ddea5e8c5
+1 -1
View File
@@ -110,7 +110,7 @@ bool lima_submit_add_bo(struct lima_submit *submit, struct lima_bo *bo, uint32_t
submit_bo->handle = bo->handle;
submit_bo->flags = flags;
struct lima_bo **jbo = util_dynarray_grow(&submit->bos, struct lima_bo, 1);
struct lima_bo **jbo = util_dynarray_grow(&submit->bos, struct lima_bo *, 1);
*jbo = bo;
/* prevent bo from being freed when submit start */