qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] qcow2: cleanup created file when qcow2_co_create


From: Alberto Garcia
Subject: Re: [PATCH] qcow2: cleanup created file when qcow2_co_create
Date: Tue, 01 Sep 2020 15:30:41 +0200
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)

On Thu 16 Jul 2020 01:33:59 PM CEST, Maxim Levitsky wrote:
>      if (ret < 0) {
> +
> +        Error *local_delete_err = NULL;
> +        int r_del = bdrv_co_delete_file(bs, &local_delete_err);
> +        /*
> +         * ENOTSUP will happen if the block driver doesn't support
> +         * the 'bdrv_co_delete_file' interface. This is a predictable
> +         * scenario and shouldn't be reported back to the user.
> +         */
> +        if ((r_del < 0) && (r_del != -ENOTSUP)) {
> +            error_report_err(local_delete_err);
> +        }

I think you're leaking the error on ENOTSUP.

Berto



reply via email to

[Prev in Thread] Current Thread [Next in Thread]