pan/midgard: Fix a memory leak in the disassembler
authorIcecream95 <ixn@keemail.me>
Wed, 22 Jan 2020 20:33:48 +0000 (09:33 +1300)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Jan 2020 20:46:38 +0000 (20:46 +0000)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3525>

src/panfrost/midgard/disassemble.c

index e92214417c41b91d8a81acec959157d48ca59d2e..1d8e84ef3291c31d5e94de0b328e9ada0092b8c8 100644 (file)
@@ -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 */