panfrost: Fix panfrost_bo_access memory leak
The bo access needs to be freed prior to removing it from its hash table. This prevents leaking them over time. Signed-off-by: Daniel Ogorchock <daniel.ogorchock@garmin.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3308>
This commit is contained in:
committed by
Tomeu Vizoso
parent
ecace26853
commit
2848edc0ef
@@ -380,8 +380,10 @@ panfrost_gc_fences(struct panfrost_context *ctx)
|
||||
panfrost_bo_access_gc_fences(ctx, access, entry->key);
|
||||
if (!util_dynarray_num_elements(&access->readers,
|
||||
struct panfrost_batch_fence *) &&
|
||||
!access->writer)
|
||||
!access->writer) {
|
||||
ralloc_free(access);
|
||||
_mesa_hash_table_remove(ctx->accessed_bos, entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user