On Fri, 05/20 19:17, Kevin Wolf wrote:
> 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 <kw...@redhat.com>

Reviewed-by: Fam Zheng <f...@redhat.com>

Reply via email to