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 >