qemu-e2k/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 authz: Fix Lesser GPL version number 2020-10-29 09:57:37 +00:00
block block: introduce BDRV_REQ_NO_WAIT flag 2020-12-18 12:35:55 +01:00
chardev chardev: do not use machine_init_done 2020-12-15 12:51:51 -05:00
crypto qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
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 softfloat: Define comparison operations for bfloat16 2020-08-29 19:25:42 -07:00
hw hw/arm/virt: Remove virt machine state 'smp_cpus' 2021-01-08 15:13:38 +00:00
io io: Fix Lesser GPL version number 2020-10-29 09:57:37 +00:00
libdecnumber include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
migration migration: Replace migration's JSON writer by the general one 2020-12-19 10:39:16 +01:00
monitor sev: add sev-inject-launch-secret 2020-12-10 17:33:17 -05:00
net qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
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 qom: Add user_creatable_print_help_from_qdict() 2020-10-15 16:06:27 +02:00
scsi scsi-generic: Fix HM-zoned device scan 2020-09-30 19:09:20 +02:00
standard-headers target/i386: Support up to 32768 CPUs without IRQ remapping 2020-12-10 12:15:00 -05:00
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 console: drop qemu_console_get_ui_info 2020-12-11 08:06:39 +01:00
user trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
elf.h target-arm queue: 2020-10-29 11:40:04 +00:00
glib-compat.h glib-compat: add g_unix_get_passwd_entry_qemu() 2020-11-02 19:52:08 -06:00
qemu-common.h vl: extract softmmu/datadir.c 2020-12-10 12:15:18 -05:00
qemu-io.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00