Mesa (master): panfrost: Fix headers and gpu_headers memory leak

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jan 13 09:35:49 UTC 2020


Module: Mesa
Branch: master
Commit: 632885741f74c12dedd4f128bba45e6a7f8d8982
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=632885741f74c12dedd4f128bba45e6a7f8d8982

Author: Daniel Ogorchock <daniel.ogorchock at garmin.com>
Date:   Tue Jan  7 10:07:37 2020 -0600

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 <daniel.ogorchock at garmin.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3308>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3308>

---

 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



More information about the mesa-commit mailing list