On Fri, Apr 06, 2018 at 06:53 PM +0200, John Ferlan <[email protected]> wrote: > Rather than using VIR_ALLOC, use the New API since we already > use the virDomainChrSourceDefFree function when done. > > Signed-off-by: John Ferlan <[email protected]> > --- > src/conf/domain_conf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index aacd06a87a..caf3f47c63 100644 > --- a/src/conf/domain_conf.c > +++ b/src/conf/domain_conf.c > @@ -11138,7 +11138,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt, > goto error; > } > > - if (VIR_ALLOC(def->data.vhostuser) < 0) > + if (!(def->data.vhostuser = virDomainChrSourceDefNew(xmlopt))) > goto error; > > def->data.vhostuser->type = VIR_DOMAIN_CHR_TYPE_UNIX; > -- > 2.13.6 > > -- > libvir-list mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/libvir-list >
Reviewed-by: Marc Hartmayer <[email protected]> -- Beste Grüße / Kind regards Marc Hartmayer IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Koederitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 -- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
