From 632885741f74c12dedd4f128bba45e6a7f8d8982 Mon Sep 17 00:00:00 2001 From: Daniel Ogorchock Date: Tue, 7 Jan 2020 10:07:37 -0600 Subject: [PATCH] panfrost: Fix headers and gpu_headers memory leak The per-batch headers/gpu_headers dynarrays need to be freed during the batch cleanup to prevent leaking. Signed-off-by: Daniel Ogorchock Reviewed-by: Alyssa Rosenzweig Tested-by: Marge Bot Part-of: --- src/gallium/drivers/panfrost/pan_job.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index d1ce9c0ec33..1b7d370b998 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -181,6 +181,9 @@ panfrost_free_batch(struct panfrost_batch *batch) panfrost_batch_fence_unreference(*dep); } + util_dynarray_fini(&batch->headers); + util_dynarray_fini(&batch->gpu_headers); + /* The out_sync fence lifetime is different from the the batch one * since other batches might want to wait on a fence of already * submitted/signaled batch. All we need to do here is make sure the