summaryrefslogtreecommitdiffstats
path: root/include/qemu
diff options
context:
space:
mode:
authorMarc-André Lureau2017-01-27 09:54:50 +0100
committerMarc-André Lureau2017-02-28 21:09:28 +0100
commite703dcbaeef6973e788a9a8d19e53094b50c0a7c (patch)
tree8d4cdfbf1d4e9c7f0b9198a19427719059920353 /include/qemu
parenttests: fix leaks in test-io-channel-command (diff)
downloadqemu-e703dcbaeef6973e788a9a8d19e53094b50c0a7c.tar.gz
qemu-e703dcbaeef6973e788a9a8d19e53094b50c0a7c.tar.xz
qemu-e703dcbaeef6973e788a9a8d19e53094b50c0a7c.zip
timer: use an inline function for free
Similarly to allocation, do it from an inline function. This allows tests to only use the headers for allocation/free of timer. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/timer.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/qemu/timer.h b/include/qemu/timer.h
index 9abed51ae8..26e628584c 100644
--- a/include/qemu/timer.h
+++ b/include/qemu/timer.h
@@ -610,7 +610,10 @@ void timer_deinit(QEMUTimer *ts);
*
* Free a timer (it must not be on the active list)
*/
-void timer_free(QEMUTimer *ts);
+static inline void timer_free(QEMUTimer *ts)
+{
+ g_free(ts);
+}
/**
* timer_del: