From: Greg Kurz <groug@kaod.org>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 04/28] timer: use an inline function for free
Date: Tue, 7 Feb 2017 17:35:04 +0100 [thread overview]
Message-ID: <20170207173504.46aa7258@bahia.lan> (raw)
In-Reply-To: <20170207135211.15870-5-marcandre.lureau@redhat.com>
On Tue, 7 Feb 2017 17:51:47 +0400
Marc-André Lureau <marcandre.lureau@redhat.com> wrote:
> Similarly to allocation, do it from an inline function. This allows
> tests to only use the headers for allocation/free of timer.
>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
Reviewed-by: Greg Kurz <groug@kaod.org>
> include/qemu/timer.h | 5 ++++-
> qemu-timer.c | 5 -----
> 2 files changed, 4 insertions(+), 6 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:
> diff --git a/qemu-timer.c b/qemu-timer.c
> index ff620ecff7..6cf70b96f6 100644
> --- a/qemu-timer.c
> +++ b/qemu-timer.c
> @@ -355,11 +355,6 @@ void timer_deinit(QEMUTimer *ts)
> ts->timer_list = NULL;
> }
>
> -void timer_free(QEMUTimer *ts)
> -{
> - g_free(ts);
> -}
> -
> static void timer_del_locked(QEMUTimerList *timer_list, QEMUTimer *ts)
> {
> QEMUTimer **pt, *t;
next prev parent reply other threads:[~2017-02-07 16:35 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 13:51 [Qemu-devel] [PATCH 00/28] Various memory leak fixes Marc-André Lureau
2017-02-07 13:51 ` [Qemu-devel] [PATCH 01/28] qtest: fix a memory leak Marc-André Lureau
2017-02-07 13:51 ` [Qemu-devel] [PATCH 02/28] tests: fix qmp response leak Marc-André Lureau
2017-02-07 13:51 ` [Qemu-devel] [PATCH 03/28] tests: fix leaks in test-io-channel-command Marc-André Lureau
2017-02-07 14:02 ` Daniel P. Berrange
2017-02-07 15:02 ` Greg Kurz
2017-02-07 13:51 ` [Qemu-devel] [PATCH 04/28] timer: use an inline function for free Marc-André Lureau
2017-02-07 16:35 ` Greg Kurz [this message]
2017-02-07 13:51 ` [Qemu-devel] [PATCH 05/28] tests: fix ptimer leaks Marc-André Lureau
2017-02-07 14:38 ` Marc-André Lureau
2017-02-07 13:51 ` [Qemu-devel] [PATCH 06/28] tests: fix endianness-test leaks Marc-André Lureau
2017-02-07 13:51 ` [Qemu-devel] [PATCH 07/28] tests: fix q35-test leaks Marc-André Lureau
2017-02-07 13:51 ` [Qemu-devel] [PATCH 08/28] tests: fix vhost-user-test leaks Marc-André Lureau
2017-02-07 13:51 ` [Qemu-devel] [PATCH 09/28] tests: fix ide-test leaks Marc-André Lureau
2017-02-08 18:16 ` John Snow
2017-02-07 13:51 ` [Qemu-devel] [PATCH 10/28] tests: fix hd-geo-test leaks Marc-André Lureau
2017-02-07 13:51 ` [Qemu-devel] [PATCH 11/28] tests: fix bios-tables-test leak Marc-André Lureau
2017-02-07 13:51 ` [Qemu-devel] [PATCH 12/28] tests: fix ipmi-kcs-test leak Marc-André Lureau
2017-02-07 13:51 ` [Qemu-devel] [PATCH 13/28] tests: fix ipmi-bt-test leak Marc-André Lureau
2017-02-07 13:51 ` [Qemu-devel] [PATCH 14/28] pc: pcihp: avoid adding ACPI_PCIHP_PROP_BSEL twice Marc-André Lureau
2017-02-07 13:51 ` [Qemu-devel] [PATCH 15/28] tests: fix eepro100-test leak Marc-André Lureau
2017-02-07 13:51 ` [Qemu-devel] [PATCH 16/28] tests: fix tco-test leaks Marc-André Lureau
2017-02-07 13:52 ` [Qemu-devel] [PATCH 17/28] tests: fix e1000-test leak Marc-André Lureau
2017-02-07 13:52 ` [Qemu-devel] [PATCH 18/28] tests: fix i440fx-test leaks Marc-André Lureau
2017-02-07 13:52 ` [Qemu-devel] [PATCH 19/28] tests: fix e1000e leaks Marc-André Lureau
2017-02-07 13:52 ` [Qemu-devel] [PATCH 20/28] tests: fix virtio-scsi-test leak Marc-André Lureau
2017-02-07 16:43 ` Greg Kurz
2017-02-07 13:52 ` [Qemu-devel] [PATCH 21/28] tests: fix virtio-9p-test leaks Marc-André Lureau
2017-02-07 16:43 ` Greg Kurz
2017-02-07 13:52 ` [Qemu-devel] [PATCH 22/28] bus: do not unref hotplug handler Marc-André Lureau
2017-02-07 13:52 ` [Qemu-devel] [PATCH 23/28] usb: replace handle_destroy with unrealize Marc-André Lureau
2017-02-07 13:52 ` [Qemu-devel] [PATCH 24/28] usb: release the created buses Marc-André Lureau
2017-02-07 13:52 ` [Qemu-devel] [PATCH 25/28] tests: allows to run single test in usb-hcd-ehci-test Marc-André Lureau
2017-02-07 13:52 ` [Qemu-devel] [PATCH 26/28] tests: fix usb-test leaks Marc-André Lureau
2017-02-07 13:52 ` [Qemu-devel] [PATCH 27/28] tests: add specialized device_find function Marc-André Lureau
2017-02-07 13:52 ` [Qemu-devel] [PATCH 28/28] tests: fix virtio-blk-test leaks Marc-André Lureau
2017-02-07 14:50 ` [Qemu-devel] [PATCH 00/28] Various memory leak fixes no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170207173504.46aa7258@bahia.lan \
--to=groug@kaod.org \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).