Mesa (staging/18.2): v3d: Fix a leak of the disassembled instruction string during debug dumps.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 10 14:55:02 UTC 2018


Module: Mesa
Branch: staging/18.2
Commit: 2462638ebabb52b9171be0472e3bd1b6a6072522
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2462638ebabb52b9171be0472e3bd1b6a6072522

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Dec  7 10:34:40 2018 -0800

v3d: Fix a leak of the disassembled instruction string during debug dumps.

Fixes: ade416d02369 ("broadcom: Add VC5 NIR compiler.")
(cherry picked from commit f1d98204c34d36876e05e1d3f2242296ccec19e3)

---

 src/broadcom/compiler/vir_to_qpu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/broadcom/compiler/vir_to_qpu.c b/src/broadcom/compiler/vir_to_qpu.c
index b5a7b841ef..4baadce294 100644
--- a/src/broadcom/compiler/vir_to_qpu.c
+++ b/src/broadcom/compiler/vir_to_qpu.c
@@ -364,6 +364,7 @@ v3d_dump_qpu(struct v3d_compile *c)
         for (int i = 0; i < c->qpu_inst_count; i++) {
                 const char *str = v3d_qpu_disasm(c->devinfo, c->qpu_insts[i]);
                 fprintf(stderr, "0x%016"PRIx64" %s\n", c->qpu_insts[i], str);
+                ralloc_free((void *)str);
         }
         fprintf(stderr, "\n");
 }




More information about the mesa-commit mailing list