if (!virFileHasSuffix(entry->d_name, ".xml"))
continue;
- if (!(path = virFileBuildPath(configDir, entry->d_name, NULL))) {
- virReportOOMError();
+ if (!(path = virFileBuildPath(configDir, entry->d_name, NULL)))
continue;
- }
nwfilter = virNWFilterObjLoad(conn, nwfilters, entry->d_name, path);
if (nwfilter)
if (!(nwfilter->configFile = virFileBuildPath(driver->configDir,
def->name, ".xml"))) {
- virReportOOMError();
return -1;
}
}
if (!virFileHasSuffix(entry->d_name, ".xml"))
continue;
- if (!(path = virFileBuildPath(configDir, entry->d_name, NULL))) {
- virReportOOMError();
+ if (!(path = virFileBuildPath(configDir, entry->d_name, NULL)))
continue;
- }
if (!(autostartLink = virFileBuildPath(autostartDir, entry->d_name,
NULL))) {
- virReportOOMError();
VIR_FREE(path);
continue;
}
if (!(pool->configFile = virFileBuildPath(driver->configDir,
def->name, ".xml"))) {
- virReportOOMError();
return -1;
}
if (!(pool->autostartLink = virFileBuildPath(driver->autostartDir,
def->name, ".xml"))) {
- virReportOOMError();
VIR_FREE(pool->configFile);
return -1;
}
if (ext == NULL) {
if (virAsprintf(&path, "%s/%s", dir, name) < 0) {
+ virReportOOMError();
return NULL;
}
} else {
if (virAsprintf(&path, "%s/%s%s", dir, name, ext) < 0) {
+ virReportOOMError();
return NULL;
}
}
/* Build the full file path */
if (!(path = virFileBuildPath(priv->configDir, ent->d_name, NULL))) {
- virReportOOMError();
closedir(dh);
return -1;
}
/* Build the full file path */
if (!(path = virFileBuildPath(priv->configDir, ent->d_name, NULL))) {
- virReportOOMError();
closedir(dh);
return -1;
}
entry = NULL;
}
- if (!(filename = virFileBuildPath(priv->configDir, def->name, NULL))) {
- virReportOOMError();
+ if (!(filename = virFileBuildPath(priv->configDir, def->name, NULL)))
goto error;
- }
if (xenXMConfigSaveFile(conn, filename, def) < 0)
goto error;