From: Stefan Weil <sw@weilnetz.de>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qapi: Fix memory leak
Date: Sat, 18 Aug 2012 23:01:52 +0200 [thread overview]
Message-ID: <503002C0.2070300@weilnetz.de> (raw)
In-Reply-To: <1345323089-26232-1-git-send-email-sw@weilnetz.de>
Am 18.08.2012 22:51, schrieb Stefan Weil:
> valgrind report:
>
> ==24534== 232 bytes in 2 blocks are definitely lost in loss record 1,245 of 1,601
> ==24534== at 0x4824F20: malloc (vg_replace_malloc.c:236)
> ==24534== by 0x293C88: malloc_and_trace (vl.c:2281)
> ==24534== by 0x489AD99: ??? (in /lib/libglib-2.0.so.0.2400.1)
> ==24534== by 0x489B23B: g_malloc0 (in /lib/libglib-2.0.so.0.2400.1)
> ==24534== by 0x2B4EFC: opts_visitor_new (opts-visitor.c:376)
> ==24534== by 0x29DEA5: net_client_init (net.c:708)
> ==24534== by 0x29E6C7: net_init_client (net.c:966)
> ==24534== by 0x2C2179: qemu_opts_foreach (qemu-option.c:1114)
> ==24534== by 0x29E85B: net_init_clients (net.c:1008)
> ==24534== by 0x296F40: main (vl.c:3463)
>
valgrind reports a lot more memory leaks which are related to
function qemu_allocate_irqs. In many cases, its return value
should be free'd. g_malloc / g_free can be avoided by adding
a new function
void qemu_init_irqs(qemu_irq_handler handler, void *opaque,
qemu_irq *irqs, int n);
If this is ok, I'll send patches which add and use the new
function instead of qemu_allocate_irqs, too.
Regards,
Stefan Weil
next prev parent reply other threads:[~2012-08-18 21:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-18 20:51 [Qemu-devel] [PATCH] qapi: Fix memory leak Stefan Weil
2012-08-18 21:01 ` Stefan Weil [this message]
2012-08-19 10:37 ` Peter Maydell
2012-08-18 21:06 ` Michael Tokarev
2012-08-19 10:15 ` Laszlo Ersek
2012-08-19 10:12 ` Laszlo Ersek
2012-08-20 14:05 ` Luiz Capitulino
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=503002C0.2070300@weilnetz.de \
--to=sw@weilnetz.de \
--cc=paul@codesourcery.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.