diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2020-09-10 15:13:38 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2020-10-03 04:25:14 -0500 |
commit | b71f3a68e2b67c2a26be0a528482fd99a089af3f (patch) | |
tree | 507a06a7407b187ff9d95f92d1d2203b97bcf60e /qemu-options.h | |
parent | 86944d1d11efaef208566de49a949dd7af232adb (diff) |
disas: Cleanup plugin_disas
Do not retain a GString in thread-local storage. Allocate a
new one and free it on every invocation. Do not g_strdup the
result; return the buffer from the GString. Do not use
warn_report.
Using cs_disasm allocated memory via the &insn parameter, but
that was never freed. Use cs_disasm_iter so that we use the
memory that we've already allocated, and so that we only try
to disassemble one insn, as desired. Do not allocate 1k to
hold the bytes for a single instruction.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'qemu-options.h')
0 files changed, 0 insertions, 0 deletions