qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <mlureau@redhat.com>
To: minyard@acm.org
Cc: marcandre lureau <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 29/37] ipmi: free extern timer
Date: Thu, 21 Jul 2016 09:10:15 -0400 (EDT)	[thread overview]
Message-ID: <251192172.7058597.1469106615846.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <5790C8AD.1070701@gmail.com>

Hi

----- Original Message -----
> I believe this is correct:
> 
> Reviewed-by: Corey Minyard <cminyard@mvista.com>
> 
> I looked around at other devices with timers, I found several (two
> watchdogs, and ipmi_bmc_sim.c, for instance) that allocate the timer in
> the realize function but don't deallocate it in the unrealize function.
> Do those need to be fixed, too?

Yes, I haven't found them myself, but I can include fixes in the series too.

thanks

> 
> -corey
> 
> 
> On 07/19/2016 03:54 AM, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > Free the timer allocated during instance init.
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> > ---
> >   hw/ipmi/ipmi_bmc_extern.c | 9 +++++++++
> >   1 file changed, 9 insertions(+)
> >
> > diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c
> > index 157879e..5b73983 100644
> > --- a/hw/ipmi/ipmi_bmc_extern.c
> > +++ b/hw/ipmi/ipmi_bmc_extern.c
> > @@ -487,6 +487,14 @@ static void ipmi_bmc_extern_init(Object *obj)
> >       vmstate_register(NULL, 0, &vmstate_ipmi_bmc_extern, ibe);
> >   }
> >   
> > +static void ipmi_bmc_extern_finalize(Object *obj)
> > +{
> > +    IPMIBmcExtern *ibe = IPMI_BMC_EXTERN(obj);
> > +
> > +    timer_del(ibe->extern_timer);
> > +    timer_free(ibe->extern_timer);
> > +}
> > +
> >   static Property ipmi_bmc_extern_properties[] = {
> >       DEFINE_PROP_CHR("chardev", IPMIBmcExtern, chr),
> >       DEFINE_PROP_END_OF_LIST(),
> > @@ -508,6 +516,7 @@ static const TypeInfo ipmi_bmc_extern_type = {
> >       .parent        = TYPE_IPMI_BMC,
> >       .instance_size = sizeof(IPMIBmcExtern),
> >       .instance_init = ipmi_bmc_extern_init,
> > +    .instance_finalize = ipmi_bmc_extern_finalize,
> >       .class_init    = ipmi_bmc_extern_class_init,
> >    };
> >   
> 
> 

  reply	other threads:[~2016-07-21 13:10 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19  8:53 [Qemu-devel] [PATCH 00/37] Various memory leak fixes marcandre.lureau
2016-07-19  8:53 ` [Qemu-devel] [PATCH 01/37] build-sys: use an override for CFLAGS filter marcandre.lureau
2016-07-19  8:53 ` [Qemu-devel] [PATCH 02/37] tests: fix test-qga leaks marcandre.lureau
2016-07-19 18:40   ` Eric Blake
2016-07-19  8:53 ` [Qemu-devel] [PATCH 03/37] qga: free the whole blacklist marcandre.lureau
2016-07-19 18:22   ` Eric Blake
2016-07-19  8:53 ` [Qemu-devel] [PATCH 04/37] qga: free remaining leaking state marcandre.lureau
2016-07-19 18:39   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 05/37] tests: fix test-cutils leaks marcandre.lureau
2016-07-19 18:40   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 06/37] tests: fix test-vmstate leaks marcandre.lureau
2016-07-19 18:41   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 07/37] tests: fix test-iov leaks marcandre.lureau
2016-07-19 20:46   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 08/37] qdist: fix entries memory leak marcandre.lureau
2016-07-19 20:54   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 09/37] tests: fix check-qom-interface leaks marcandre.lureau
2016-07-19 20:55   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 10/37] tests: fix check-qom-proplist leaks marcandre.lureau
2016-07-19 21:01   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 11/37] tests: fix small leak in test-io-channel-command marcandre.lureau
2016-07-19 21:04   ` Eric Blake
2016-07-19 21:16     ` Marc-André Lureau
2016-07-21 10:39       ` Marc-André Lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 12/37] tests: fix leak in test-string-input-visitor marcandre.lureau
2016-07-19 23:37   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 13/37] portio: keep references on portio marcandre.lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 14/37] numa: do not leak NumaOptions marcandre.lureau
2016-07-19 23:39   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 15/37] pc: simplify passing qemu_irq marcandre.lureau
2016-07-19 23:40   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 16/37] pc: don't leak a20_line marcandre.lureau
2016-07-19 23:40   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 17/37] machine: use class base init generated name marcandre.lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 18/37] acpi-build: fix array leak marcandre.lureau
2016-07-21 14:52   ` Marcel Apfelbaum
2016-07-21 15:48     ` Marc-André Lureau
2016-07-21 15:51       ` Marcel Apfelbaum
2016-07-21 16:47         ` Marcel Apfelbaum
2016-07-19  8:54 ` [Qemu-devel] [PATCH 19/37] char: disconnect peer when qemu_chr_free() marcandre.lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 20/37] char: free MuxDriver when closing marcandre.lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 21/37] tests: fix qom-test leaks marcandre.lureau
2016-07-19 23:50   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 22/37] pc: free i8259 marcandre.lureau
2016-07-28 11:47   ` Marcel Apfelbaum
2016-07-19  8:54 ` [Qemu-devel] [PATCH 23/37] pci-bus: do not allocate and leak bsel marcandre.lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 24/37] pc: keep gsi reference marcandre.lureau
2016-07-21 17:18   ` Eduardo Habkost
2016-07-21 17:27     ` Marc-André Lureau
2016-07-21 18:07       ` Eduardo Habkost
2016-07-21 18:28         ` Marc-André Lureau
2016-07-21 19:44           ` Eduardo Habkost
2016-07-19  8:54 ` [Qemu-devel] [PATCH 25/37] ahci: free irqs array marcandre.lureau
2016-07-19 18:50   ` John Snow
2016-07-19  8:54 ` [Qemu-devel] [PATCH 26/37] sd: free timer marcandre.lureau
     [not found]   ` <CAJ+F1CLiqgK_eOM2S3u8Vc4TR-Mi9DPW-LG3PdbgT9-5b49FGg@mail.gmail.com>
2016-07-21 16:53     ` Andrew Baumann
2016-07-21 17:17       ` Marc-André Lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 27/37] qjson: free str marcandre.lureau
2016-07-20 12:25   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 28/37] virtio-input: free config list marcandre.lureau
2016-07-22  7:58   ` Gerd Hoffmann
2016-07-22  8:20     ` Marc-André Lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 29/37] ipmi: free extern timer marcandre.lureau
2016-07-21 13:05   ` Corey Minyard
2016-07-21 13:10     ` Marc-André Lureau [this message]
2016-07-19  8:54 ` [Qemu-devel] [PATCH 30/37] usb: free USBDevice.strings marcandre.lureau
2016-07-22  7:59   ` Gerd Hoffmann
2016-07-19  8:54 ` [Qemu-devel] [PATCH 31/37] tests: free a bunch of qmp responses marcandre.lureau
2016-07-20 13:16   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 32/37] usb: free leaking path marcandre.lureau
2016-07-22  8:00   ` Gerd Hoffmann
2016-07-19  8:54 ` [Qemu-devel] [PATCH 33/37] bus: simplify name handling marcandre.lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 34/37] tests: pc-cpu-test marcandre.lureau
2016-07-19  9:04   ` Marc-André Lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 35/37] tests: fix rsp leak in postcopy-test marcandre.lureau
2016-07-20 13:48   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 36/37] ahci: fix sglist leak on retry marcandre.lureau
2016-07-19 20:45   ` John Snow
2016-07-19  8:54 ` [Qemu-devel] [PATCH 37/37] tests: fix postcopy-test leaks marcandre.lureau

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=251192172.7058597.1469106615846.JavaMail.zimbra@redhat.com \
    --to=mlureau@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=minyard@acm.org \
    --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).