Re: [Qemu-block] [PATCH] block: fix bs->file leak in bdrv_new_open_driver()

2017-07-07 Thread Manos Pitsidianakis
On Fri, Jul 07, 2017 at 11:28:15AM +0200, Kevin Wolf wrote: Am 29.06.2017 um 22:06 hat Manos Pitsidianakis geschrieben: On Thu, Jun 29, 2017 at 03:57:49PM +0200, Kevin Wolf wrote: >Am 29.06.2017 um 14:07 hat Manos Pitsidianakis geschrieben: >>On Thu, Jun 29, 2017 at 01:18:24PM +0200, Kevin Wolf

Re: [Qemu-block] [PATCH] block: fix bs->file leak in bdrv_new_open_driver()

2017-07-07 Thread Kevin Wolf
Am 29.06.2017 um 22:06 hat Manos Pitsidianakis geschrieben: > On Thu, Jun 29, 2017 at 03:57:49PM +0200, Kevin Wolf wrote: > >Am 29.06.2017 um 14:07 hat Manos Pitsidianakis geschrieben: > >>On Thu, Jun 29, 2017 at 01:18:24PM +0200, Kevin Wolf wrote: > >>>Am 29.06.2017 um 08:03 hat Manos

Re: [Qemu-block] [PATCH] block: fix bs->file leak in bdrv_new_open_driver()

2017-06-29 Thread Manos Pitsidianakis
On Thu, Jun 29, 2017 at 03:57:49PM +0200, Kevin Wolf wrote: Am 29.06.2017 um 14:07 hat Manos Pitsidianakis geschrieben: On Thu, Jun 29, 2017 at 01:18:24PM +0200, Kevin Wolf wrote: >Am 29.06.2017 um 08:03 hat Manos Pitsidianakis geschrieben: >>bdrv_open_driver() is called in two places,

Re: [Qemu-block] [PATCH] block: fix bs->file leak in bdrv_new_open_driver()

2017-06-29 Thread Kevin Wolf
Am 29.06.2017 um 14:07 hat Manos Pitsidianakis geschrieben: > On Thu, Jun 29, 2017 at 01:18:24PM +0200, Kevin Wolf wrote: > >Am 29.06.2017 um 08:03 hat Manos Pitsidianakis geschrieben: > >>bdrv_open_driver() is called in two places, bdrv_new_open_driver() and > >>bdrv_open_common(). In the latter,

Re: [Qemu-block] [PATCH] block: fix bs->file leak in bdrv_new_open_driver()

2017-06-29 Thread Manos Pitsidianakis
On Thu, Jun 29, 2017 at 01:18:24PM +0200, Kevin Wolf wrote: Am 29.06.2017 um 08:03 hat Manos Pitsidianakis geschrieben: bdrv_open_driver() is called in two places, bdrv_new_open_driver() and bdrv_open_common(). In the latter, failure cleanup in is in its caller, bdrv_open_inherit(), which

Re: [Qemu-block] [PATCH] block: fix bs->file leak in bdrv_new_open_driver()

2017-06-29 Thread Kevin Wolf
Am 29.06.2017 um 08:03 hat Manos Pitsidianakis geschrieben: > bdrv_open_driver() is called in two places, bdrv_new_open_driver() and > bdrv_open_common(). In the latter, failure cleanup in is in its caller, > bdrv_open_inherit(), which unrefs the bs->file of the failed driver open > if it exists.

[Qemu-block] [PATCH] block: fix bs->file leak in bdrv_new_open_driver()

2017-06-29 Thread Manos Pitsidianakis
bdrv_open_driver() is called in two places, bdrv_new_open_driver() and bdrv_open_common(). In the latter, failure cleanup in is in its caller, bdrv_open_inherit(), which unrefs the bs->file of the failed driver open if it exists. Let's check for this in bdrv_new_open_driver() as well.