aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-12-14 13:30:55 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-12-14 13:30:55 +0000
commit397cd31f01228c42d32261a6db3ead140cac8a7c (patch)
tree61a065de78882855b498569b0855bdc5536cfbbe /include
parent0012eb98f165e98ede33b5b57fb1985f1fe224b7 (diff)
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 'include')
0 files changed, 0 insertions, 0 deletions