diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c index 18d9fe369b31bedfe5ac9a9aeafae4915d0f9543..2c9174e5363d24126cb3e7441d8171b8ac33e6f8 100644 --- a/src/xenconfig/xen_xl.c +++ b/src/xenconfig/xen_xl.c @@ -1034,6 +1034,7 @@ xenFormatXLDisk(virConfValuePtr list, virDomainDiskDefPtr disk) int format = virDomainDiskGetFormat(disk); const char *driver = virDomainDiskGetDriver(disk); char *target = NULL; + int ret = -1; /* format */ virBufferAddLit(&buf, "format="); @@ -1119,12 +1120,12 @@ xenFormatXLDisk(virConfValuePtr list, virDomainDiskDefPtr disk) tmp->next = val; else list->list = val; - return 0; + ret = 0; cleanup: VIR_FREE(target); virBufferFreeAndReset(&buf); - return -1; + return ret; }