Adapt to VIR_ALLOC and virAsprintf in src/node_device/*

This commit is contained in:
Michal Privoznik
2013-07-04 12:11:59 +02:00
parent 56965922ab
commit 95cc21491c
2 changed files with 5 additions and 17 deletions

View File

@@ -78,10 +78,8 @@ static int update_driver_name(virNodeDeviceObjPtr dev)
VIR_FREE(dev->def->driver);
if (virAsprintf(&driver_link, "%s/driver", dev->def->sysfs_path) < 0) {
virReportOOMError();
if (virAsprintf(&driver_link, "%s/driver", dev->def->sysfs_path) < 0)
goto cleanup;
}
/* Some devices don't have an explicit driver, so just return
without a name */