qemu-cr16/include
Peter Maydell 5f8e93c3e2 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
2021-01-08 15:13:38 +00:00
..
authz
block
chardev
crypto
disas disas: Push const down through host disassembly 2021-01-07 05:09:42 -10:00
exec tcg: Make DisasContextBase.tb const 2021-01-07 05:09:41 -10:00
fpu
hw hw/arm/virt: Remove virt machine state 'smp_cpus' 2021-01-08 15:13:38 +00:00
io
libdecnumber
migration
monitor
net
qapi qobject: Make QString immutable 2020-12-19 10:39:41 +01:00
qemu util/qemu-timer: Make timer_free() imply timer_del() 2021-01-08 15:13:38 +00:00
qom
scsi
standard-headers
sysemu tcg: Add --accel tcg,split-wx property 2021-01-07 05:09:41 -10:00
tcg tcg: Constify tcg_code_gen_epilogue 2021-01-07 05:09:42 -10:00
ui
user
elf.h
glib-compat.h
qemu-common.h
qemu-io.h
trace-tcg.h