diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index 607ba56efdc1a4f1dc1935425e159ed7fdfd42fb..f07b3d9725b6f2cd11360cd2de4f8bdb23699beb 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -1044,28 +1044,22 @@ virDomainPCIAddressSetExtensionAlloc(virDomainPCIAddressSetPtr addrs, if (VIR_ALLOC(addrs->zpciIds) < 0) return -1; - if (!(addrs->zpciIds->uids = virHashCreateFull(10, NULL, - virZPCIAddrKeyCode, - virZPCIAddrKeyEqual, - virZPCIAddrKeyCopy, - virZPCIAddrKeyPrintHuman, - virZPCIAddrKeyFree))) - goto error; - - if (!(addrs->zpciIds->fids = virHashCreateFull(10, NULL, - virZPCIAddrKeyCode, - virZPCIAddrKeyEqual, - virZPCIAddrKeyCopy, - virZPCIAddrKeyPrintHuman, - virZPCIAddrKeyFree))) - goto error; + addrs->zpciIds->uids = virHashCreateFull(10, NULL, + virZPCIAddrKeyCode, + virZPCIAddrKeyEqual, + virZPCIAddrKeyCopy, + virZPCIAddrKeyPrintHuman, + virZPCIAddrKeyFree); + + addrs->zpciIds->fids = virHashCreateFull(10, NULL, + virZPCIAddrKeyCode, + virZPCIAddrKeyEqual, + virZPCIAddrKeyCopy, + virZPCIAddrKeyPrintHuman, + virZPCIAddrKeyFree); } return 0; - - error: - virDomainPCIAddressSetExtensionFree(addrs); - return -1; }