[PATCH v3 1/4] src: adopt to VIR_DRV_SUPPORTS_FEATURE return -1
Nikolay Shirokovskiy
nshirokovskiy at virtuozzo.com
Thu Jan 7 13:58:05 UTC 2021
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 <mprivozn at redhat.com> 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 <nshirokovskiy at virtuozzo.com>
> >> ---
> >> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20210107/572c828c/attachment-0001.htm>
More information about the libvir-list
mailing list