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

2016-05-24 Thread Kevin Wolf
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 a

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

2016-05-23 Thread Fam Zheng
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.

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

2016-05-20 Thread Kevin Wolf
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 th