On Thu, Jul 12, 2018 at 10:54:20AM +0800, Fam Zheng wrote:
> It is wrong to leave this field as 1, as nvme_close() called in the
> error handling code in nvme_file_open() will use it and try to free
> s->queues again.
> 
> Another problem is the cleaning ups are duplicated between the fail*
> labels of nvme_init() and nvme_file_open(), which calls nvme_close().
> 
> A third problem is nvme_close() misses g_free() and
> event_notifier_cleanup().
> 
> Fix all of them.
> 
> Cc: qemu-sta...@nongnu.org
> Signed-off-by: Fam Zheng <f...@redhat.com>
> 
> ---
> 
> v2: Adopt the suggested fix by Kevin.
> ---
>  block/nvme.c | 37 ++++++++++++-------------------------
>  1 file changed, 12 insertions(+), 25 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>

Attachment: signature.asc
Description: PGP signature

Reply via email to