summaryrefslogtreecommitdiffstats
path: root/scripts/qapi
diff options
context:
space:
mode:
authorPeter Maydell2018-12-14 14:30:55 +0100
committerPeter Maydell2018-12-14 14:30:55 +0100
commit397cd31f01228c42d32261a6db3ead140cac8a7c (patch)
tree61a065de78882855b498569b0855bdc5536cfbbe /scripts/qapi
parenttests/test-arm-mptimer: Don't leak string memory (diff)
downloadqemu-397cd31f01228c42d32261a6db3ead140cac8a7c.tar.gz
qemu-397cd31f01228c42d32261a6db3ead140cac8a7c.tar.xz
qemu-397cd31f01228c42d32261a6db3ead140cac8a7c.zip
target/arm: Create timers in realize, not init
The timer_new() function allocates memory; this means that if we call it in the CPU's init method we would need to provide an instance_finalize method to free it. Defer the timer creation to the realize function instead. This fixes a memory leak spotted by clang LeakSanitizer when a CPU object is created for introspection. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20181204132952.2601-6-peter.maydell@linaro.org
Diffstat (limited to 'scripts/qapi')
0 files changed, 0 insertions, 0 deletions