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

Fixes: ade416d023 ("broadcom: Add VC5 NIR compiler.")
(cherry picked from commit f1d98204c3)
This commit is contained in:
Eric Anholt 2018-12-07 10:34:40 -08:00 committed by Emil Velikov
parent 61b8ae8cc8
commit d1f14bade8

View file

@ -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");
}