Re: [Qemu-block] [PATCH] xen-block: stop leaking memory in xen_block_drive_create()

2019-02-25 Thread Anthony PERARD
On Tue, Feb 19, 2019 at 04:36:28PM +, Paul Durrant wrote: > > The locally allocated QDict-s need to be freed. ('file_layer' will be > > freed implicitly since it is added as an object to 'driver_layer'). > > > > Spotted by Coverity: CID 1398649 > > > > While in the neighbourhood free

Re: [Qemu-block] [PATCH] xen-block: stop leaking memory in xen_block_drive_create()

2019-02-19 Thread Paul Durrant
Apologies... typo-ed qemu-devel... > -Original Message- > From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: 19 February 2019 16:35 > To: qeme-de...@nongnu.org; qemu-block@nongnu.org; xen- > de...@lists.xenproject.org > Cc: Paul Durrant ; Peter Maydell > ; Stefano Stabellini ; >

Re: [Qemu-block] [PATCH] xen-block: stop leaking memory in xen_block_drive_create()

2019-02-19 Thread Peter Maydell
Hi Paul -- you typoed the qemu-devel list email address; cc'd the right one. thanks -- PMM On Tue, 19 Feb 2019 at 16:35, Paul Durrant wrote: > > The locally allocated QDict-s need to be freed. ('file_layer' will be > freed implicitly since it is added as an object to 'driver_layer'). > >

[Qemu-block] [PATCH] xen-block: stop leaking memory in xen_block_drive_create()

2019-02-19 Thread Paul Durrant
The locally allocated QDict-s need to be freed. ('file_layer' will be freed implicitly since it is added as an object to 'driver_layer'). Spotted by Coverity: CID 1398649 While in the neighbourhood free 'driver' and 'filename' as soon as they are added to the QDicts. Freeing after the 'done'