libxl: Resolve Coverity RESOURCE_LEAK

The returned socks from virNetSocketNewListenTCP needs to be VIR_FREE'd
as well as seach of the Close/Unref on all the socks[i] that is
already done
This commit is contained in:
John Ferlan 2015-05-01 07:25:39 -04:00
parent c0d3f608d6
commit 11b9167954

View File

@ -445,6 +445,7 @@ libxlDomainMigrationPrepare(virConnectPtr dconn,
virNetSocketClose(socks[i]);
virObjectUnref(socks[i]);
}
VIR_FREE(socks);
/* Remove virDomainObj from domain list */
if (vm) {
virDomainObjListRemove(driver->domains, vm);