Mesa (master): pan/midgard: Fix a memory leak in the disassembler

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 23 21:14:08 UTC 2020


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

Author: Icecream95 <ixn at keemail.me>
Date:   Thu Jan 23 09:33:48 2020 +1300

pan/midgard: Fix a memory leak in the disassembler

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3525>

---

 src/panfrost/midgard/disassemble.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/panfrost/midgard/disassemble.c b/src/panfrost/midgard/disassemble.c
index e92214417c4..1d8e84ef329 100644
--- a/src/panfrost/midgard/disassemble.c
+++ b/src/panfrost/midgard/disassemble.c
@@ -1550,6 +1550,8 @@ disassemble_midgard(uint8_t *code, size_t size, unsigned gpu_id, gl_shader_stage
                 i += 4 * num_quad_words;
         }
 
+        free(midg_tags);
+
         /* We computed work_count as max_work_registers, so add one to get the
          * count. If no work registers are written, you still have one work
          * reported, which is exactly what the hardware expects */



More information about the mesa-commit mailing list