summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost
diff options
context:
space:
mode:
authorDaniel Ogorchock <[email protected]>2020-01-06 17:33:49 -0600
committerTomeu Vizoso <[email protected]>2020-01-13 09:11:35 +0000
commit2848edc0eff5570abaac0a4017a9c96ebabbd728 (patch)
treef20ffe7e4029e6e10c2abda35f39e170f9a6780c /src/gallium/drivers/panfrost
parentecace268535993bce954ee4e7516f9bbc60acc46 (diff)
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 <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3308>
Diffstat (limited to 'src/gallium/drivers/panfrost')
-rw-r--r--src/gallium/drivers/panfrost/pan_job.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index 208e287740a..d1ce9c0ec33 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -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);
+ }
}
}