Commit 56b254dcc called virCPUx86DataAdd, but returned -1 directly
without calling the virCPUx86DataFree.
Found by Coverity.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/cpu/cpu_x86.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
index 71fc365139..978a60c90a 100644
--- a/src/cpu/cpu_x86.c
+++ b/src/cpu/cpu_x86.c
@@ -2791,7 +2791,7 @@ virCPUx86GetHost(virCPUDefPtr cpu,
};
if (virCPUx86DataAdd(cpuData, &item) < 0)
- return -1;
+ goto cleanup;
}
}
--
2.20.1