Adapt to VIR_ALLOC and virAsprintf in tools/*

This commit is contained in:
Michal Privoznik
2013-07-04 12:20:45 +02:00
parent 3ea84b9548
commit 76fad65bdc
4 changed files with 10 additions and 29 deletions

View File

@@ -709,10 +709,8 @@ cmdDomIfGetLink(vshControl *ctl, const vshCmd *cmd)
if (virAsprintf(&xpath, "/domain/devices/interface[(mac/@address = '%s') or "
" (target/@dev = '%s')]",
macstr, iface) < 0) {
virReportOOMError();
macstr, iface) < 0)
goto cleanup;
}
if ((ninterfaces = virXPathNodeSet(xpath, ctxt, &interfaces)) < 0) {
vshError(ctl, _("Failed to extract interface information"));