qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Kirill Batuzov
Subject: Re: [Qemu-devel] [PATCH] hw/arm/realview.c: Fix memory leak in realview_init()
Date: Thu, 20 Nov 2014 14:53:12 +0300 (MSK)
User-agent: Alpine 2.02 (DEB 1266 2009-07-14)

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 leak. The fact that it indeed was a memory
leak is indicated by Valgrind output (Memcheck's false-positives are
extremely rare unless you do some really nasty things with your pointers).
It can be verified manually too: there are only 4 occurrences of 'ram_lo'
in realview.c.

By fixing memory leak this patch silences warnings from automatic checking
tools like Valgrind. Not having minor warnings is good because it simplifies
usage of such tools in order to find new and important bugs.

This patch is local: it does not affect any other function except
realview_init.

Given all this I can see benefits of this patch with no real downsides to it.
Is this enough to proof it's worthwhile?

-- 
Kirill



reply via email to

[Prev in Thread] Current Thread [Next in Thread]