Richard Henderson <richard.hender...@linaro.org> writes:

> 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.
>
> Signed-off-by: Richard Henderson <richard.hender...@linaro.org>

Reviewed-by: Alex Bennée <alex.ben...@linaro.org>

-- 
Alex Bennée

Reply via email to