qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3] block: Fix bdrv_next() memory leak


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v3] block: Fix bdrv_next() memory leak
Date: Tue, 24 May 2016 09:30:44 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 20.05.2016 um 19:17 hat Kevin Wolf geschrieben:
> The bdrv_next() users all leaked the BdrvNextIterator after completing
> the iteration. Simply changing bdrv_next() to free the iterator before
> returning NULL at the end of list doesn't work because some callers exit
> the loop before looking at all BDSes.
> 
> This patch moves the BdrvNextIterator from the heap to the stack of
> the caller and switches to a bdrv_first()/bdrv_next() interface for
> initialising the iterator.
> 
> Signed-off-by: Kevin Wolf <address@hidden>

Applied to the block branch.

Kevin



reply via email to

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