On Wed, Feb 06, 2019 at 08:41:44AM -0500, John Ferlan wrote: > Let's make use of the auto __cleanup capabilities cleaning up any > now unnecessary goto paths. > > Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> > --- ... > > @@ -6342,7 +6302,7 @@ testDomainSnapshotCreateXML(virDomainPtr domain, > virDomainSnapshotObjPtr snap = NULL; > virDomainSnapshotPtr snapshot = NULL; > virObjectEventPtr event = NULL; > - char *xml = NULL; > + VIR_AUTOFREE(char *) xml = NULL; @xml will become unused in this function with this conversion, so I'd say cook up a trivial patch that will get rid of it as unused. Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx> > bool update_current = true; > bool redefine = flags & VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE; > unsigned int parse_flags = VIR_DOMAIN_SNAPSHOT_PARSE_DISKS; > @@ -6427,7 +6387,6 @@ testDomainSnapshotCreateXML(virDomainPtr domain, > > snapshot = virGetDomainSnapshot(domain, snap->def->name); > cleanup: > - VIR_FREE(xml); > if (vm) { > if (snapshot) { > virDomainSnapshotObjPtr other; -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list