qemu-block
[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: Maxim Levitsky
Subject: Re: [PATCH] qcow2: cleanup created file when qcow2_co_create
Date: Sun, 11 Oct 2020 11:38:15 +0300
User-agent: Evolution 3.36.3 (3.36.3-1.fc32)

On Tue, 2020-09-01 at 15:30 +0200, Alberto Garcia wrote:
> 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.

Indeed, just like in the original code from where I copy&pasta'ed this from.
I'll send a patch to fix this and update the patch as well.

Thanks,
Best regards,
        Maxim Levitsky

> 
> Berto
> 





reply via email to

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