Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/libxl/xen_xm.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/libxl/xen_xm.c b/src/libxl/xen_xm.c index ac86ddf9b7..f978b94f93 100644 --- a/src/libxl/xen_xm.c +++ b/src/libxl/xen_xm.c @@ -238,9 +238,9 @@ xenParseXMDisk(char *entry, int hvm) static int xenParseXMDiskList(virConf *conf, virDomainDef *def) { - char **disks = NULL, **entries; + g_auto(GStrv) disks = NULL; + GStrv entries; int hvm = def->os.type == VIR_DOMAIN_OSTYPE_HVM; - int ret = -1; int rc; rc = virConfGetValueStringList(conf, "disk", false, &disks); @@ -258,10 +258,7 @@ xenParseXMDiskList(virConf *conf, virDomainDef *def) VIR_APPEND_ELEMENT(def->disks, def->ndisks, disk); } - ret = 0; - - g_strfreev(disks); - return ret; + return 0; } -- 2.31.1