summaryrefslogtreecommitdiffstats
path: root/replay/replay-debugging.c
diff options
context:
space:
mode:
authorPeter Maydell2020-12-15 16:41:04 +0100
committerPeter Maydell2021-01-08 16:13:38 +0100
commit5f8e93c3e262ab518c9e8f9a5bb2b391b3d64be9 (patch)
treeb90b1b0de483d93844950e012b5c20b6849350c6 /replay/replay-debugging.c
parenthw/arm/highbank: Drop dead KVM support code (diff)
downloadqemu-5f8e93c3e262ab518c9e8f9a5bb2b391b3d64be9.tar.gz
qemu-5f8e93c3e262ab518c9e8f9a5bb2b391b3d64be9.tar.xz
qemu-5f8e93c3e262ab518c9e8f9a5bb2b391b3d64be9.zip
util/qemu-timer: Make timer_free() imply timer_del()
Currently timer_free() is a simple wrapper for g_free(). This means that the timer being freed must not be currently active, as otherwise QEMU might crash later when the active list is processed and still has a pointer to freed memory on it. As a result almost all calls to timer_free() are preceded by a timer_del() call, as can be seen in the output of git grep -B1 '\<timer_free\>' This is unfortunate API design as it makes it easy to accidentally misuse (by forgetting the timer_del()), and the correct use is annoyingly verbose. Make timer_free() imply a timer_del(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20201215154107.3255-2-peter.maydell@linaro.org
Diffstat (limited to 'replay/replay-debugging.c')
0 files changed, 0 insertions, 0 deletions