return guest;
-error:
+ error:
virCapabilitiesFreeGuest(guest);
return NULL;
}
return dom;
-error:
+ error:
virCapabilitiesFreeGuestDomain(dom);
return NULL;
}
return 0;
-no_memory:
+ no_memory:
VIR_FREE(l);
VIR_FREE(t);
return -1;
return copy;
-error:
+ error:
virCPUDefFree(copy);
return NULL;
}
}
}
-cleanup:
+ cleanup:
VIR_FREE(fallback);
VIR_FREE(vendor_id);
VIR_FREE(nodes);
return def;
-error:
+ error:
virCPUDefFree(def);
def = NULL;
goto cleanup;
return virBufferContentAndReset(&buf);
-no_memory:
+ no_memory:
virReportOOMError();
-cleanup:
+ cleanup:
virBufferFreeAndReset(&buf);
return NULL;
}
identical = true;
-cleanup:
+ cleanup:
return identical;
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(domain);
VIR_FREE(bus);
VIR_FREE(slot);
virt, reason, vmname, uuidstr,
oldsrc, newsrc);
-cleanup:
+ cleanup:
VIR_FREE(vmname);
VIR_FREE(oldsrc);
VIR_FREE(newsrc);
virt, reason, vmname, uuidstr,
oldsrc, newsrc);
-cleanup:
+ cleanup:
VIR_FREE(vmname);
VIR_FREE(oldsrc);
VIR_FREE(newsrc);
return;
-no_memory:
+ no_memory:
VIR_WARN("OOM while encoding audit message");
goto cleanup;
}
virt, reason, vmname, uuidstr,
oldsrc, newsrc);
-cleanup:
+ cleanup:
VIR_FREE(vmname);
VIR_FREE(oldsrc);
VIR_FREE(newsrc);
"virt=%s resrc=net reason=open %s uuid=%s net=%s %s rdev=%s",
virt, vmname, uuidstr, macstr, dev_name, VIR_AUDIT_STR(rdev));
-cleanup:
+ cleanup:
VIR_FREE(vmname);
VIR_FREE(dev_name);
VIR_FREE(rdev);
goto cleanup;
}
-cleanup:
+ cleanup:
VIR_FREE(vmname);
VIR_FREE(device);
VIR_FREE(address);
virDomainRedirdevBusTypeToString(redirdev->bus),
device);
-cleanup:
+ cleanup:
VIR_FREE(vmname);
VIR_FREE(device);
VIR_FREE(address);
break;
}
-cleanup:
+ cleanup:
VIR_FREE(vmname);
VIR_FREE(device);
}
virDomainAuditCgroup(vm, cgroup, reason, extra, rc == 0);
-cleanup:
+ cleanup:
VIR_FREE(extra);
VIR_FREE(detail);
VIR_FREE(rdev);
return 0;
-error:
+ error:
VIR_FREE(c);
VIR_FREE(dev->path);
return -1;
return ret;
-error:
+ error:
virDomainDiskHostDefFree(nhosts, ret);
return NULL;
}
return ret;
-error:
+ error:
if (ret) {
for (i = 0; i < nvcpupin; i++) {
if (ret[i]) {
VIR_DEBUG("obj=%p", domain);
return domain;
-error:
+ error:
virObjectUnref(domain);
return NULL;
}
return NULL;
}
}
-cleanup:
+ cleanup:
return vm;
-error:
+ error:
virObjectUnlock(vm);
vm = NULL;
goto cleanup;
goto out;
ret = 0;
-out:
+ out:
return ret;
}
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
}
ret = 0;
-cleanup:
+ cleanup:
for (i = 0; i < nbitmaps; i++)
virBitmapFree(bitmaps[i]);
return ret;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(controller);
VIR_FREE(bus);
VIR_FREE(target);
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(controller);
VIR_FREE(bus);
VIR_FREE(port);
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(cssid);
VIR_FREE(ssid);
VIR_FREE(devno);
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(controller);
VIR_FREE(slot);
return ret;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(bus);
VIR_FREE(port);
return ret;
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(reg);
return ret;
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(startport);
return ret;
}
*bootIndex = boot;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(order);
return ret;
}
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(iobase);
VIR_FREE(irq);
return ret;
ret = 0;
-cleanup:
+ cleanup:
if (ret == -1)
VIR_FREE(info->alias);
VIR_FREE(type);
}
ret = 0;
-out:
+ out:
return ret;
}
}
ret = 0;
-out:
+ out:
return ret;
}
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(bus);
VIR_FREE(target);
VIR_FREE(unit);
}
ret = 0;
-error:
+ error:
VIR_FREE(managed);
VIR_FREE(sgio);
VIR_FREE(backendStr);
goto error;
}
ret = 0;
-error:
+ error:
return ret;
}
return def;
-error:
+ error:
virSecurityLabelDefFree(def);
return NULL;
}
return 0;
-error:
+ error:
ctxt->node = saved_node;
for (; i > 0; i--) {
virSecurityLabelDefFree(def->seclabels[i - 1]);
return 0;
-error:
+ error:
for (i = 0; i < nseclabels; i++) {
virSecurityDeviceLabelDefFree(seclabels[i]);
}
def->path = path;
path = key = lockspace = NULL;
-cleanup:
+ cleanup:
VIR_FREE(lockspace);
VIR_FREE(key);
VIR_FREE(path);
source = NULL;
ret = 0;
-cleanup:
+ cleanup:
virDomainDiskSourcePoolDefFree(source);
VIR_FREE(mode);
return ret;
ret = 0;
-cleanup:
+ cleanup:
virDomainDiskHostDefClear(&host);
VIR_FREE(protocol);
VIR_FREE(transport);
&& virDomainDiskDefAssignAddress(xmlopt, def) < 0)
goto error;
-cleanup:
+ cleanup:
VIR_FREE(bus);
VIR_FREE(type);
VIR_FREE(snapshot);
ctxt->node = save_ctxt;
return def;
-error:
+ error:
virDomainDiskDefFree(def);
def = NULL;
goto cleanup;
*val = bytes;
ret = 1;
-cleanup:
+ cleanup:
VIR_FREE(xpath_full);
VIR_FREE(unit);
return ret;
goto error;
}
-cleanup:
+ cleanup:
ctxt->node = saved;
VIR_FREE(type);
VIR_FREE(idx);
if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0)
goto error;
-cleanup:
+ cleanup:
ctxt->node = save_node;
VIR_FREE(type);
VIR_FREE(fsdriver);
*def = actual;
actual = NULL;
ret = 0;
-error:
+ error:
VIR_FREE(type);
VIR_FREE(mode);
VIR_FREE(addrtype);
goto error;
}
-cleanup:
+ cleanup:
ctxt->node = oldnode;
VIR_FREE(macaddr);
VIR_FREE(network);
return def;
-error:
+ error:
virDomainNetDefFree(def);
def = NULL;
goto cleanup;
ret = 0;
-error:
+ error:
VIR_FREE(targetType);
VIR_FREE(addrStr);
VIR_FREE(portStr);
break;
}
-cleanup:
+ cleanup:
VIR_FREE(mode);
VIR_FREE(protocol);
VIR_FREE(bindHost);
return remaining;
-error:
+ error:
virDomainChrSourceDefClear(def);
remaining = -1;
goto cleanup;
goto error;
}
-cleanup:
+ cleanup:
VIR_FREE(type);
return def;
-error:
+ error:
virDomainChrDefFree(def);
def = NULL;
goto cleanup;
goto error;
}
-cleanup:
+ cleanup:
VIR_FREE(mode);
VIR_FREE(type);
return def;
-error:
+ error:
virDomainSmartcardDefFree(def);
def = NULL;
goto cleanup;
if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0)
goto error;
-cleanup:
+ cleanup:
VIR_FREE(type);
VIR_FREE(path);
VIR_FREE(model);
ctxt->node = save;
return def;
-error:
+ error:
virDomainTPMDefFree(def);
def = NULL;
goto cleanup;
goto error;
}
-cleanup:
+ cleanup:
VIR_FREE(type);
VIR_FREE(bus);
return def;
-error:
+ error:
virDomainInputDefFree(def);
def = NULL;
goto cleanup;
if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0)
goto error;
-cleanup:
+ cleanup:
VIR_FREE(type);
return def;
-error:
+ error:
virDomainHubDefFree(def);
def = NULL;
goto cleanup;
}
}
-cleanup:
+ cleanup:
VIR_FREE(name);
VIR_FREE(present);
VIR_FREE(tickpolicy);
return def;
-error:
+ error:
VIR_FREE(def);
goto cleanup;
}
}
ret = 0;
-error:
+ error:
if (ret < 0)
virDomainGraphicsListenDefClear(def);
VIR_FREE(type);
}
}
-cleanup:
+ cleanup:
VIR_FREE(type);
VIR_FREE(listenNodes);
VIR_FREE(listenAddr);
ctxt->node = save;
return def;
-error:
+ error:
virDomainGraphicsDefFree(def);
def = NULL;
goto cleanup;
goto error;
}
-cleanup:
+ cleanup:
VIR_FREE(type);
return def;
-error:
+ error:
virDomainSoundCodecDefFree(def);
def = NULL;
goto cleanup;
if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0)
goto error;
-cleanup:
+ cleanup:
VIR_FREE(model);
ctxt->node = save;
return def;
-error:
+ error:
virDomainSoundDefFree(def);
def = NULL;
goto cleanup;
if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0)
goto error;
-cleanup:
+ cleanup:
VIR_FREE(action);
VIR_FREE(model);
return def;
-error:
+ error:
virDomainWatchdogDefFree(def);
def = NULL;
goto cleanup;
if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0)
goto error;
-cleanup:
+ cleanup:
VIR_FREE(model);
VIR_FREE(backend);
VIR_FREE(type);
ctxt->node = save;
return def;
-error:
+ error:
virDomainRNGDefFree(def);
def = NULL;
goto cleanup;
if (virDomainDeviceInfoParseXML(node, NULL, &def->info, flags) < 0)
goto error;
-cleanup:
+ cleanup:
VIR_FREE(model);
ctxt->node = save;
return def;
-error:
+ error:
virDomainMemballoonDefFree(def);
def = NULL;
goto cleanup;
return def;
-error:
+ error:
virDomainNVRAMDefFree(def);
return NULL;
}
def->system_family =
virXPathString("string(system/entry[@name='family'])", ctxt);
-cleanup:
+ cleanup:
VIR_FREE(type);
VIR_FREE(tmpUUID);
return def;
-error:
+ error:
virSysinfoDefFree(def);
def = NULL;
goto cleanup;
return def;
-error:
+ error:
virDomainVideoDefFree(def);
VIR_FREE(type);
VIR_FREE(ram);
}
}
-cleanup:
+ cleanup:
VIR_FREE(type);
VIR_FREE(mode);
ctxt->node = save;
return def;
-error:
+ error:
virDomainHostdevDefFree(def);
def = NULL;
goto cleanup;
}
-cleanup:
+ cleanup:
VIR_FREE(bus);
VIR_FREE(type);
return def;
-error:
+ error:
virDomainRedirdevDefFree(def);
def = NULL;
goto cleanup;
def->version = hex;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(version_copy);
return ret;
}
goto error;
}
-cleanup:
+ cleanup:
VIR_FREE(class);
VIR_FREE(vendor);
VIR_FREE(product);
VIR_FREE(allow);
return def;
-error:
+ error:
VIR_FREE(def);
def = NULL;
goto cleanup;
ctxt->node = save;
return def;
-error:
+ error:
VIR_FREE(nodes);
virDomainRedirFilterDefFree(def);
return NULL;
if (virDomainDeviceDefPostParse(dev, def, caps, xmlopt) < 0)
goto error;
-cleanup:
+ cleanup:
xmlFreeDoc(xml);
xmlXPathFreeContext(ctxt);
return dev;
-error:
+ error:
VIR_FREE(dev);
goto cleanup;
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(tmp);
VIR_FREE(nodes);
return ret;
goto cleanup;
}
-cleanup:
+ cleanup:
ctxt->node = save_ctxt;
return idmap;
}
goto error;
return panic;
-error:
+ error:
virDomainPanicDefFree(panic);
return NULL;
}
goto error;
}
-cleanup:
+ cleanup:
ctxt->node = oldnode;
return def;
-error:
+ error:
VIR_FREE(def);
goto cleanup;
}
/* Yes, we really do use kibibytes for our internal sizing. */
*mem = VIR_DIV_UP(bytes, 1024);
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
ctxt->node = tmp;
return def;
-error:
+ error:
ctxt->node = tmp;
virDomainResourceDefFree(def);
return NULL;
return def;
-error:
+ error:
VIR_FREE(tmp);
VIR_FREE(nodes);
virHashFree(bootHash);
return obj;
-error:
+ error:
virObjectUnref(obj);
VIR_FREE(nodes);
return NULL;
def = virDomainDefParseXML(xml, root, ctxt, caps, xmlopt,
expectedVirtTypes, flags);
-cleanup:
+ cleanup:
xmlXPathFreeContext(ctxt);
return def;
}
ctxt->node = root;
obj = virDomainObjParseXML(xml, ctxt, caps, xmlopt, expectedVirtTypes, flags);
-cleanup:
+ cleanup:
xmlXPathFreeContext(ctxt);
return obj;
}
return true;
-error:
+ error:
err = virSaveLastError();
strSrc = virDomainDefFormat(src, 0);
return 0;
-error:
+ error:
virDomainVcpuPinDefFree(vcpupin);
return -1;
}
return virBufferContentAndReset(&buf);
-no_memory:
+ no_memory:
virReportOOMError();
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
goto cleanup;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(xml);
return ret;
}
goto cleanup;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(xml);
return ret;
}
VIR_FREE(autostartLink);
return dom;
-error:
+ error:
VIR_FREE(configFile);
VIR_FREE(autostartLink);
virDomainDefFree(def);
VIR_FREE(statusFile);
return obj;
-error:
+ error:
virObjectUnref(obj);
VIR_FREE(statusFile);
return NULL;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(configFile);
VIR_FREE(autostartLink);
return ret;
if (!data->active)
data->count++;
}
-cleanup:
+ cleanup:
virObjectUnlock(obj);
}
goto cleanup;
if (virDomainObjIsActive(obj) && data->numids < data->maxids)
data->ids[data->numids++] = obj->def->id;
-cleanup:
+ cleanup:
virObjectUnlock(obj);
}
else
data->numnames++;
}
-cleanup:
+ cleanup:
virObjectUnlock(obj);
}
goto done;
}
-done:
+ done:
return rc;
}
goto done;
}
-done:
+ done:
return rc;
}
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
xmlStr = virBufferContentAndReset(&buf);
ret = virDomainDeviceDefParse(xmlStr, def, caps, xmlopt, flags);
-cleanup:
+ cleanup:
VIR_FREE(xmlStr);
return ret;
}
data->domains[data->ndomains++] = dom;
-cleanup:
+ cleanup:
virObjectUnlock(vm);
return;
}
ret = data.ndomains;
-cleanup:
+ cleanup:
if (data.domains) {
int count = virHashSize(doms->objs);
for (i = 0; i < count; i++)
virReportError(VIR_ERR_NO_DOMAIN_METADATA, "%s",
_("Requested metadata element is not present"));
-cleanup:
+ cleanup:
return ret;
}
ret = 0;
-cleanup:
+ cleanup:
xmlFreeDoc(doc);
return ret;
}
return (virObjectEventPtr)ev;
-error:
+ error:
virObjectUnref(ev);
return NULL;
}
return (virObjectEventPtr)ev;
-error:
+ error:
virObjectUnref(ev);
return NULL;
}
return (virObjectEventPtr)ev;
-error:
+ error:
virObjectUnref(ev);
return NULL;
}
VIR_WARN("Unexpected event ID %d", event->eventID);
-cleanup:
+ cleanup:
virDomainFree(dom);
}
return (virObjectEventPtr)ev;
-error:
+ error:
virObjectUnref(ev);
return NULL;
}
ret = 0;
-error:
+ error:
VIR_FREE(ipNodes);
return ret;
}
ret = 0;
-error:
+ error:
VIR_FREE(ipNodes);
return ret;
}
ret = 0;
-error:
+ error:
VIR_FREE(protoNodes);
ctxt->node = save;
return ret;
}
}
-error:
+ error:
VIR_FREE(interfaces);
ctxt->node = bridge;
return ret;
def->data.bond.itf[i] = itf;
}
-error:
+ error:
VIR_FREE(interfaces);
ctxt->node = bond;
return ret;
ctxt->node = cur;
return def;
-error:
+ error:
ctxt->node = cur;
virInterfaceDefFree(def);
return NULL;
ctxt->node = root;
def = virInterfaceDefParseXML(ctxt, VIR_INTERFACE_TYPE_LAST);
-cleanup:
+ cleanup:
xmlXPathFreeContext(ctxt);
return def;
}
if (virBufferError(buf))
goto no_memory;
return 0;
-no_memory:
+ no_memory:
virReportOOMError();
-cleanup:
+ cleanup:
return -1;
}
}
ret = cnt;
-cleanup:
+ cleanup:
if ((ret < 0) && dest)
virInterfaceObjListFree(dest);
return ret;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(average);
VIR_FREE(peak);
VIR_FREE(burst);
return def;
-error:
+ error:
virNetDevBandwidthFree(def);
return NULL;
}
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
}
ret = 0;
-cleanup:
+ cleanup:
ctxt->node = save;
VIR_FREE(tagNodes);
VIR_FREE(trunk);
if (virNetDevVPortProfileCheckNoExtras(virtPort) < 0)
goto error;
-cleanup:
+ cleanup:
VIR_FREE(virtPortManagerID);
VIR_FREE(virtPortTypeID);
VIR_FREE(virtPortTypeIDVersion);
return virtPort;
-error:
+ error:
VIR_FREE(virtPort);
goto cleanup;
}
network->def = def;
return network;
-error:
+ error:
virNetworkObjUnlock(network);
virNetworkObjFree(network);
return NULL;
if (!(xml = virNetworkDefFormat(def, flags)))
goto cleanup;
newDef = virNetworkDefParseString(xml);
-cleanup:
+ cleanup:
VIR_FREE(xml);
return newDef;
}
}
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(start);
VIR_FREE(end);
return ret;
host->ip = inaddr;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(mac);
VIR_FREE(id);
VIR_FREE(name);
return 0;
-error:
+ error:
virNetworkDNSHostDefClear(def);
return -1;
}
}
return 0;
-error:
+ error:
virNetworkDNSSrvDefClear(def);
return -1;
}
}
return 0;
-error:
+ error:
virNetworkDNSTxtDefClear(def);
return -1;
}
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(forwardPlainNames);
VIR_FREE(fwdNodes);
VIR_FREE(hostNodes);
result = 0;
-cleanup:
+ cleanup:
if (result < 0) {
virNetworkIpDefClear(def);
}
result = 0;
-cleanup:
+ cleanup:
if (result < 0) {
virNetworkRouteDefClear(def);
}
goto cleanup;
result = 0;
-cleanup:
+ cleanup:
if (result < 0) {
virPortGroupDefClear(def);
}
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(addrStart);
VIR_FREE(addrEnd);
VIR_FREE(natAddrNodes);
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(type);
VIR_FREE(forwardDev);
VIR_FREE(forwardManaged);
ctxt->node = save;
return def;
-error:
+ error:
VIR_FREE(routeNodes);
VIR_FREE(stp);
virNetworkDefFree(def);
ctxt->node = root;
def = virNetworkDefParseXML(ctxt);
-cleanup:
+ cleanup:
xmlXPathFreeContext(ctxt);
return def;
}
virBufferAddLit(buf, "</ip>\n");
result = 0;
-error:
+ error:
return result;
}
virBufferAddLit(buf, "/>\n");
result = 0;
-error:
+ error:
return result;
}
virBufferAddLit(buf, "</nat>\n");
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(addrStart);
VIR_FREE(addrEnd);
return ret;
return 0;
-error:
+ error:
return -1;
}
return virBufferContentAndReset(&buf);
-no_memory:
+ no_memory:
virReportOOMError();
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
return virBufferContentAndReset(&buf);
-no_memory:
+ no_memory:
virReportOOMError();
-error:
+ error:
virBufferFreeAndReset(&buf);
return NULL;
}
goto cleanup;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(xml);
return ret;
}
goto cleanup;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(xml);
return ret;
}
net->taint = taint;
-cleanup:
+ cleanup:
VIR_FREE(configFile);
xmlFreeDoc(xml);
xmlXPathFreeContext(ctxt);
return net;
-error:
+ error:
VIR_FREE(nodes);
virBitmapFree(class_id_map);
virNetworkDefFree(def);
return net;
-error:
+ error:
VIR_FREE(configFile);
VIR_FREE(autostartLink);
virNetworkDefFree(def);
ret = 0;
-error:
+ error:
VIR_FREE(configFile);
VIR_FREE(autostartLink);
return ret;
}
ret = 0;
-error:
+ error:
return ret;
}
}
ret = 0;
-cleanup:
+ cleanup:
virNetworkDHCPHostDefClear(&host);
return ret;
}
}
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
}
ret = 0;
-cleanup:
+ cleanup:
virNetworkForwardIfDefClear(&iface);
return ret;
}
}
ret = 0;
-cleanup:
+ cleanup:
virPortGroupDefClear(&portgroup);
return ret;
}
}
ret = 0;
-cleanup:
+ cleanup:
virNetworkDNSHostDefClear(&host);
return ret;
}
}
ret = 0;
-cleanup:
+ cleanup:
virNetworkDNSSrvDefClear(&srv);
return ret;
}
}
ret = 0;
-cleanup:
+ cleanup:
virNetworkDNSTxtDefClear(&txt);
return ret;
}
break;
}
-cleanup:
+ cleanup:
xmlFreeDoc(doc);
xmlXPathFreeContext(ctxt);
return ret;
}
ret = 0;
-cleanup:
+ cleanup:
virNetworkDefFree(livedef);
virNetworkDefFree(configdef);
return ret;
ret = 0;
}
-cleanup:
+ cleanup:
if (vm)
virNetworkObjUnlock(vm);
return ret;
ret = nnets;
-cleanup:
+ cleanup:
if (tmp_nets) {
for (i = 0; i < nnets; i++) {
if (tmp_nets[i])
}
VIR_WARN("Unexpected event ID %d", event->eventID);
-cleanup:
+ cleanup:
virNetworkFree(net);
}
}
ret = 0;
-out:
+ out:
VIR_FREE(nodes);
ctxt->node = orignode;
return ret;
data->scsi.type = virXPathString("string(./type[1])", ctxt);
ret = 0;
-out:
+ out:
ctxt->node = orignode;
return ret;
}
ret = 0;
-out:
+ out:
ctxt->node = orignode;
return ret;
}
ret = 0;
-out:
+ out:
VIR_FREE(type);
ctxt->node = orignode;
VIR_FREE(nodes);
}
ret = 0;
-out:
+ out:
ctxt->node = orignode;
return ret;
}
data->usb_if.description = virXPathString("string(./description[1])", ctxt);
ret = 0;
-out:
+ out:
ctxt->node = orignode;
return ret;
}
data->usb_dev.product_name = virXPathString("string(./product[1])", ctxt);
ret = 0;
-out:
+ out:
ctxt->node = orignode;
return ret;
}
}
ret = 0;
-cleanup:
+ cleanup:
ctxt->node = origNode;
VIR_FREE(numberStr);
VIR_FREE(addrNodes);
}
}
ret = 0;
-out:
+ out:
ctxt->node = orignode;
return ret;
}
data->system.firmware.release_date = virXPathString("string(./firmware/release_date[1])", ctxt);
ret = 0;
-out:
+ out:
ctxt->node = orignode;
return ret;
}
goto error;
return caps;
-error:
+ error:
virNodeDevCapsDefFree(caps);
return NULL;
}
ctxt->node = root;
def = virNodeDeviceDefParseXML(ctxt, create, virt_type);
-cleanup:
+ cleanup:
xmlXPathFreeContext(ctxt);
return def;
}
}
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
virNodeDeviceObjUnlock(parent);
-out:
+ out:
return ret;
}
ret = ndevices;
-cleanup:
+ cleanup:
if (tmp_devices) {
for (i = 0; i < ndevices; i++) {
if (tmp_devices[i])
return true;
-arg_err_exit:
+ arg_err_exit:
virReportError(VIR_ERR_INVALID_ARG,
"%s", errmsg);
return false;
return true;
-arg_err_exit:
+ arg_err_exit:
virReportError(VIR_ERR_INVALID_ARG,
"%s", errmsg);
return false;
if (!ret->params)
goto err_exit;
-cleanup:
+ cleanup:
return ret;
-err_exit:
+ err_exit:
virNWFilterIncludeDefFree(ret);
ret = NULL;
goto cleanup;
virNWFilterRuleDefFixup(ret);
-cleanup:
+ cleanup:
VIR_FREE(prio);
VIR_FREE(action);
VIR_FREE(direction);
return ret;
-err_exit:
+ err_exit:
virNWFilterRuleDefFree(ret);
ret = NULL;
goto cleanup;
virReportError(VIR_ERR_INVALID_ARG, "%s", msg);
VIR_FREE(msg);
-err_exit:
+ err_exit:
return NULL;
}
ctxt->node = root;
def = virNWFilterDefParseXML(ctxt);
-cleanup:
+ cleanup:
xmlXPathFreeContext(ctxt);
return def;
}
goto cleanup;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(xml);
return ret;
}
ret = STREQ(xml1, xml2);
-cleanup:
+ cleanup:
if (!cmpUUIDs)
memcpy(def2->uuid, rem_uuid, sizeof(rem_uuid));
virBufferAsprintf(buf,
"<%s/>\n", type);
-err_exit:
+ err_exit:
return;
}
ret = 0;
-cleanup:
+ cleanup:
virMutexUnlock(&ipAddressMapLock);
return ret;
ret = virNWFilterVarValueGetCardinality(val);
}
} else {
-remove_entry:
+ remove_entry:
/* remove whole entry */
val = virNWFilterHashTableRemoveEntry(ipAddressMap, ifname);
virNWFilterVarValueFree(val);
return res;
-err_exit:
+ err_exit:
virNWFilterVarValueFree(res);
return NULL;
}
return res;
-err_exit:
+ err_exit:
virNWFilterVarCombIterFree(res);
return NULL;
}
size_t i;
for (i = 0; i < ci->nIter; i++) {
-next:
+ next:
ci->iter[i].curValue++;
if (ci->iter[i].curValue <= ci->iter[i].maxValue) {
if (!virNWFilterVarCombIterEntryAreUniqueEntries(
return 0;
-err_exit:
+ err_exit:
return -1;
}
}
value = NULL;
}
-skip_entry:
+ skip_entry:
virNWFilterVarValueFree(value);
VIR_FREE(nam);
VIR_FREE(val);
}
return table;
-err_exit:
+ err_exit:
VIR_FREE(nam);
VIR_FREE(val);
virNWFilterVarValueFree(value);
_("Malformatted variable"));
}
-err_exit:
+ err_exit:
virNWFilterVarAccessFree(dest);
return NULL;
ret++;
}
-cleanup:
+ cleanup:
if (event)
virObjectUnref(event->conn);
VIR_FREE(event);
return state;
-error:
+ error:
virObjectEventStateFree(state);
return NULL;
}
state->timer = -1;
}
-cleanup:
+ cleanup:
virObjectEventStateUnlock(state);
return ret;
}
def->snapshot = VIR_DOMAIN_SNAPSHOT_LOCATION_EXTERNAL;
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(snapshot);
VIR_FREE(type);
if (ret < 0)
ret = def;
-cleanup:
+ cleanup:
VIR_FREE(creation);
VIR_FREE(state);
VIR_FREE(nodes);
ctxt->node = root;
def = virDomainSnapshotDefParse(ctxt, caps, xmlopt,
expectedVirtTypes, flags);
-cleanup:
+ cleanup:
xmlXPathFreeContext(ctxt);
return def;
}
ret = 0;
-cleanup:
+ cleanup:
virBitmapFree(map);
return ret;
}
ret = count;
*snaps = list;
-cleanup:
+ cleanup:
for (i = 0; i < count; i++)
VIR_FREE(names[i]);
VIR_FREE(names);
}
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(uuid);
return ret;
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(authType);
VIR_FREE(username);
return ret;
source->product = virXPathString("string(./product/@name)", ctxt);
ret = 0;
-cleanup:
+ cleanup:
ctxt->node = relnode;
VIR_FREE(port);
ret = def;
def = NULL;
-cleanup:
+ cleanup:
virStoragePoolSourceFree(def);
xmlFreeDoc(doc);
xmlXPathFreeContext(xpath_ctxt);
perms->label = virXPathString("string(./label)", ctxt);
ret = 0;
-error:
+ error:
ctxt->node = relnode;
return ret;
}
goto error;
}
-cleanup:
+ cleanup:
VIR_FREE(uuid);
VIR_FREE(type);
VIR_FREE(target_path);
return ret;
-error:
+ error:
virStoragePoolDefFree(ret);
ret = NULL;
goto cleanup;
ctxt->node = root;
def = virStoragePoolDefParseXML(ctxt);
-cleanup:
+ cleanup:
xmlXPathFreeContext(ctxt);
return def;
}
return virBufferContentAndReset(&buf);
-no_memory:
+ no_memory:
virReportOOMError();
-cleanup:
+ cleanup:
virBufferFreeAndReset(&buf);
return NULL;
}
DEFAULT_VOL_PERM_MODE) < 0)
goto error;
-cleanup:
+ cleanup:
VIR_FREE(nodes);
VIR_FREE(allocation);
VIR_FREE(capacity);
VIR_FREE(type);
return ret;
-error:
+ error:
virStorageVolDefFree(ret);
ret = NULL;
goto cleanup;
ctxt->node = root;
def = virStorageVolDefParseXML(pool, ctxt);
-cleanup:
+ cleanup:
xmlXPathFreeContext(ctxt);
return def;
}
return virBufferContentAndReset(&buf);
-no_memory:
+ no_memory:
virReportOOMError();
-cleanup:
+ cleanup:
virBufferFreeAndReset(&buf);
return NULL;
}
return virBufferContentAndReset(&buf);
-no_memory:
+ no_memory:
virReportOOMError();
-cleanup:
+ cleanup:
virBufferFreeAndReset(&buf);
return NULL;
}
ret = 0;
}
-cleanup:
+ cleanup:
if (pool)
virStoragePoolObjUnlock(pool);
return ret;
ret = npools;
-cleanup:
+ cleanup:
if (tmp_pools) {
for (i = 0; i < npools; i++) {
if (tmp_pools[i])
ctxt->node = old_node;
return ret;
- cleanup:
+ cleanup:
virStorageEncryptionSecretFree(ret);
VIR_FREE(uuidstr);
ctxt->node = old_node;
return ret;
- cleanup:
+ cleanup:
VIR_FREE(nodes);
virStorageEncryptionFree(ret);
return NULL;
ctxt->node = root;
enc = virStorageEncryptionParseXML(ctxt);
- cleanup:
+ cleanup:
xmlXPathFreeContext(ctxt);
return enc;
}
sanitizedPath = virFileSanitizePath(path);
-cleanup:
+ cleanup:
VIR_FREE(path);
VIR_FREE(devCopy);
/* we hold the lock */
ret = 0;
-cleanup:
+ cleanup:
VIR_FORCE_CLOSE(lockfd);
VIR_FREE(path);
VIR_FREE(pidStr);
goto error;
return devs;
-error:
+ error:
virChrdevFree(devs);
return NULL;
}
virMutexUnlock(&devs->lock);
return 0;
-error:
+ error:
savedError = virSaveLastError();
if (added)