Sigh.. One more issue with the patch series. I sent a tiny patch for formal approval.
Nikolay On Thu, Jan 7, 2021 at 3:00 PM Michal Privoznik <[email protected]> wrote: > On 1/7/21 12:53 PM, John Ferlan wrote: > > > > > > On 12/18/20 1:56 AM, Nikolay Shirokovskiy wrote: > >> Otherwise in some places we can mistakenly report 'unsupported' error > instead > >> of root cause. So let's handle root cause explicitly from the macro. > >> > >> Signed-off-by: Nikolay Shirokovskiy <[email protected]> > >> --- > >> src/libvirt-domain.c | 511 > ++++++++++++++++++++++++++++++++++----------------- > >> src/libvirt-host.c | 18 +- > >> src/libvirt.c | 7 +- > >> 3 files changed, 365 insertions(+), 171 deletions(-) > >> > > > > [...] > > > >> @@ -3005,8 +3019,11 @@ virDomainMigrateVersion3Full(virDomainPtr domain, > >> return NULL; > >> params = tmp; > >> > >> - if (VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn, > >> - > VIR_DRV_FEATURE_MIGRATE_CHANGE_PROTECTION)) > >> + ret = VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn, > >> + > VIR_DRV_FEATURE_MIGRATE_CHANGE_PROTECTION); > >> + if (ret < 0) > >> + return NULL; > >> + if (ret) > > > > Coverity complains this is a RESOURCE_LEAK for @tmp (or essentially > @params) > > > > Perhaps the hunk for VIR_DRV_SUPPORTS_FEATURE should go before > > virTypedParamsCopy or use goto done (similar if !dom_xml)? > > > > Yes, reorder looks good. > > Michal > >
