Also remove the temporary variable - even virStringListCopy
aborts on OOM now.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/conf/domain_capabilities.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
index 837b004334..4b867dd997 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -199,14 +199,10 @@ virDomainCapsCPUModelsAdd(virDomainCapsCPUModelsPtr cpuModels,
char **blockers)
{
g_autofree char * nameCopy = NULL;
- VIR_AUTOSTRINGLIST blockersCopy = NULL;
virDomainCapsCPUModelPtr cpu;
nameCopy = g_strdup(name);
- if (virStringListCopy(&blockersCopy, (const char **)blockers) < 0)
- return -1;
-
if (VIR_RESIZE_N(cpuModels->models, cpuModels->nmodels_max,
cpuModels->nmodels, 1) < 0)
return -1;
@@ -216,7 +212,7 @@ virDomainCapsCPUModelsAdd(virDomainCapsCPUModelsPtr cpuModels,
cpu->usable = usable;
cpu->name = g_steal_pointer(&nameCopy);
- cpu->blockers = g_steal_pointer(&blockersCopy);
+ cpu->blockers = g_strdupv(blockers);
return 0;
}
--
2.26.2