From: Daniel Ogorchock Date: Tue, 7 Jan 2020 16:07:37 +0000 (-0600) Subject: panfrost: Fix headers and gpu_headers memory leak X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=632885741f74c12dedd4f128bba45e6a7f8d8982;p=mesa.git 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: --- 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