Re: [Qemu-devel] [PATCH] qdev: Fix memory leak

2012-05-14 Thread dunrong huang
Thanks for your reply. As you say, for an input visitor we dont need to initialize the pointer. "visit_type_str" in set_mac function and set_pci_devfn function is a input visitor, it points to "qmp_input_type_str", if qmp_input_type_str failed, it will alloc a Error struct and return. So, i think

Re: [Qemu-devel] [PATCH] qdev: Fix memory leak

2012-05-14 Thread Michael Roth
On Mon, May 14, 2012 at 09:36:36PM +0200, Stefan Weil wrote: > Hello, > > Am 03.05.2012 10:34, schrieb dunrong huang: > >The str allocated in visit_type_str was not freed > > > >Signed-off-by: dunrong huang > >--- > >hw/qdev-properties.c | 8 ++-- > >1 files changed, 6 insertions(+), 2 deletio

Re: [Qemu-devel] [PATCH] qdev: Fix memory leak

2012-05-14 Thread Stefan Weil
Hello, Am 03.05.2012 10:34, schrieb dunrong huang: The str allocated in visit_type_str was not freed Signed-off-by: dunrong huang --- hw/qdev-properties.c | 8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 98dd06a..8088

Re: [Qemu-devel] [PATCH] qdev: Fix memory leak

2012-05-03 Thread dunrong huang
Sorry, i miss the "[PATCH]" in mail's title, i will resend it again. 2012/5/3 dunrong huang > The str allocated in visit_type_str was not freed > > Signed-off-by: dunrong huang > --- > hw/qdev-properties.c |8 ++-- > 1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/hw/

[Qemu-devel] [PATCH] qdev: Fix memory leak

2012-05-03 Thread dunrong huang
The str allocated in visit_type_str was not freed Signed-off-by: dunrong huang --- hw/qdev-properties.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 98dd06a..8088699 100644 --- a/hw/qdev-properties.c +++ b/hw/qd

[Qemu-devel] [PATCH] qdev: Fix memory leak

2012-05-03 Thread dunrong huang
The str allocated in visit_type_str was not freed Signed-off-by: dunrong huang --- hw/qdev-properties.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 98dd06a..8088699 100644 --- a/hw/qdev-properties.c +++ b/hw/qd

Re: [Qemu-devel] [PATCH] qdev: Fix memory leak in function set_pci_devfn

2012-04-28 Thread Andreas Färber
Am 28.04.2012 14:32, schrieb Stefan Weil: > Valgrind reported this memory leak which occured very often. > > Test scenario: > > qemu-system-i386 (no arguments), only BIOS started, terminate with > monitor command (quit). > > v2: > Use error_free instead of g_free (hint from Andreas Färber, thank

[Qemu-devel] [PATCH] qdev: Fix memory leak in function set_pci_devfn

2012-04-28 Thread Stefan Weil
Valgrind reported this memory leak which occured very often. Test scenario: qemu-system-i386 (no arguments), only BIOS started, terminate with monitor command (quit). v2: Use error_free instead of g_free (hint from Andreas Färber, thanks). Signed-off-by: Stefan Weil --- hw/qdev-properties.c |