Re: [Qemu-devel] [PATCH] hw/arm/realview.c: Fix memory leak in realview_init()

2014-11-20 Thread Markus Armbruster
Nikita Belov writes: > Variable 'ram_lo' is allocated unconditionally, but used only in some cases. > When it is unused pointer will be lost at function exit, resulting in a > memory leak. Free memory in this case. > > Valgrind output: > ==16879== 240 bytes in 1 blocks are definitely lost in loss

Re: [Qemu-devel] [PATCH] hw/arm/realview.c: Fix memory leak in realview_init()

2014-11-20 Thread Kirill Batuzov
> On 20 November 2014 11:53, Kirill Batuzov wrote: > > I'm surprised that this small patch caused so much controversy. It seems > > very simple and straightforward to me. > > > > This patch fixes a memory leak. The fact that it indeed was a memory > > leak is indicated by Valgrind output (Memcheck

Re: [Qemu-devel] [PATCH] hw/arm/realview.c: Fix memory leak in realview_init()

2014-11-20 Thread Peter Maydell
On 20 November 2014 11:53, Kirill Batuzov wrote: > I'm surprised that this small patch caused so much controversy. It seems > very simple and straightforward to me. > > This patch fixes a memory leak. The fact that it indeed was a memory > leak is indicated by Valgrind output (Memcheck's false-pos

Re: [Qemu-devel] [PATCH] hw/arm/realview.c: Fix memory leak in realview_init()

2014-11-20 Thread Kirill Batuzov
On Wed, 19 Nov 2014, Peter Maydell wrote: > > Not for 2.2, Fair enough. > and I'm still not really convinced in > general that it's worthwhile at all. > I'm surprised that this small patch caused so much controversy. It seems very simple and straightforward to me. This patch fixes a memory lea

Re: [Qemu-devel] [PATCH] hw/arm/realview.c: Fix memory leak in realview_init()

2014-11-19 Thread Peter Maydell
On 19 November 2014 15:05, Nikita Belov wrote: > ping Not for 2.2, and I'm still not really convinced in general that it's worthwhile at all. thanks -- PMM

Re: [Qemu-devel] [PATCH] hw/arm/realview.c: Fix memory leak in realview_init()

2014-11-19 Thread Nikita Belov
On 2014-10-29 17:03, Nikita Belov wrote: Variable 'ram_lo' is allocated unconditionally, but used only in some cases. When it is unused pointer will be lost at function exit, resulting in a memory leak. Free memory in this case. Valgrind output: ==16879== 240 bytes in 1 blocks are definitely l

Re: [Qemu-devel] [PATCH] hw/arm/realview.c: Fix memory leak in realview_init()

2014-10-31 Thread Kirill Batuzov
On Fri, 31 Oct 2014, Peter Maydell wrote: > On 31 October 2014 10:42, Nikita Belov wrote: > > On 2014-10-29 19:03, Peter Maydell wrote: > >> We leak all of the MemoryRegions we allocate here, because we > >> don't have a persistent state struct to keep them in. This > >> doesn't really matter muc

Re: [Qemu-devel] [PATCH] hw/arm/realview.c: Fix memory leak in realview_init()

2014-10-31 Thread Nikita Belov
On 2014-10-29 19:03, Peter Maydell wrote: On 29 October 2014 14:03, Nikita Belov wrote: Variable 'ram_lo' is allocated unconditionally, but used only in some cases. When it is unused pointer will be lost at function exit, resulting in a memory leak. Free memory in this case. Valgrind output:

Re: [Qemu-devel] [PATCH] hw/arm/realview.c: Fix memory leak in realview_init()

2014-10-31 Thread Peter Maydell
On 31 October 2014 10:42, Nikita Belov wrote: > On 2014-10-29 19:03, Peter Maydell wrote: >> We leak all of the MemoryRegions we allocate here, because we >> don't have a persistent state struct to keep them in. This >> doesn't really matter much because they're generally needed >> for the lifetim

[Qemu-devel] [PATCH] hw/arm/realview.c: Fix memory leak in realview_init()

2014-10-29 Thread Nikita Belov
Variable 'ram_lo' is allocated unconditionally, but used only in some cases. When it is unused pointer will be lost at function exit, resulting in a memory leak. Free memory in this case. Valgrind output: ==16879== 240 bytes in 1 blocks are definitely lost in loss record 6,033 of 7,018 ==16879==

Re: [Qemu-devel] [PATCH] hw/arm/realview.c: Fix memory leak in realview_init()

2014-10-29 Thread Peter Maydell
On 29 October 2014 14:03, Nikita Belov wrote: > Variable 'ram_lo' is allocated unconditionally, but used only in some cases. > When it is unused pointer will be lost at function exit, resulting in a > memory leak. Free memory in this case. > > Valgrind output: > ==16879== 240 bytes in 1 blocks are