Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- src/cpu/cpu_ppc64.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/cpu/cpu_ppc64.c b/src/cpu/cpu_ppc64.c index 9eaf9c6ae5..81c3ce8319 100644 --- a/src/cpu/cpu_ppc64.c +++ b/src/cpu/cpu_ppc64.c @@ -281,8 +281,7 @@ ppc64VendorParse(xmlXPathContextPtr ctxt G_GNUC_UNUSED, void *data) { ppc64_map *map = data; - ppc64_vendor *vendor; - int ret = -1; + g_autoptr(ppc64_vendor) vendor = NULL; if (VIR_ALLOC(vendor) < 0) return -1; @@ -292,17 +291,13 @@ ppc64VendorParse(xmlXPathContextPtr ctxt G_GNUC_UNUSED, if (ppc64VendorFind(map, vendor->name)) { virReportError(VIR_ERR_INTERNAL_ERROR, _("CPU vendor %s already defined"), vendor->name); - goto cleanup; + return -1; } if (VIR_APPEND_ELEMENT(map->vendors, map->nvendors, vendor) < 0) - goto cleanup; - - ret = 0; + return -1; - cleanup: - ppc64VendorFree(vendor); - return ret; + return 0; } -- 2.26.2