cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugo Trippaers <trip...@gmail.com>
Subject Fwd: New Defects reported by Coverity Scan for cloudstack
Date Fri, 24 Jan 2014 12:46:10 GMT
FYI

Sent from my iPhone

Begin forwarded message:

> From: scan-admin@coverity.com
> Date: 24 januari 2014 13:22:59 CET
> Subject: New Defects reported by Coverity Scan for cloudstack
> 
> 
> Hi,
> 
> 
> Please find the latest report on new defect(s) introduced to cloudstack found with Coverity
Scan.
> 
> Defect(s) Reported-by: Coverity Scan
> Showing 20 of 52 defect(s)
> 
> 
> ** CID 1164002:  Logically dead code  (DEADCODE)
> /server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java: 388 in com.cloud.api.query.dao.TemplateJoinDaoImpl.searchByTemplateZonePair(java.lang.Boolean,
java.lang.String[])()
> 
> ** CID 1164018:  Explicit null dereferenced  (FORWARD_NULL)
> /server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java: 730 in com.cloud.vm.snapshot.VMSnapshotManagerImpl.deleteAllVMSnapshots(long,
com.cloud.vm.snapshot.VMSnapshot$Type)()
> 
> ** CID 1164020:  Explicit null dereferenced  (FORWARD_NULL)
> /server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java: 478 in com.cloud.vm.snapshot.VMSnapshotManagerImpl.deleteVMSnapshot(java.lang.Long)()
> 
> ** CID 1164017:  Explicit null dereferenced  (FORWARD_NULL)
> /server/src/com/cloud/storage/VolumeApiServiceImpl.java: 1619 in com.cloud.storage.VolumeApiServiceImpl.migrateVolume(org.apache.cloudstack.api.command.user.volume.MigrateVolumeCmd)()
> 
> ** CID 1164019:  Explicit null dereferenced  (FORWARD_NULL)
> /server/src/com/cloud/storage/VolumeApiServiceImpl.java: 1721 in com.cloud.storage.VolumeApiServiceImpl.takeSnapshot(java.lang.Long,
java.lang.Long, java.lang.Long, com.cloud.user.Account, boolean)()
> 
> ** CID 1164016:  Dereference after null check  (FORWARD_NULL)
> /server/src/com/cloud/storage/VolumeApiServiceImpl.java: 2033 in com.cloud.storage.VolumeApiServiceImpl.sendAttachVolumeCommand(com.cloud.vm.UserVmVO,
com.cloud.storage.VolumeVO, java.lang.Long)()
> 
> ** CID 1164013:  Dereference after null check  (FORWARD_NULL)
> /plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/VirtualNetworkModel.java:
535 in org.apache.cloudstack.network.contrail.model.VirtualNetworkModel.compare(org.apache.cloudstack.network.contrail.model.ModelController,
org.apache.cloudstack.network.contrail.model.ModelObject)()
> 
> ** CID 1164012:  Explicit null dereferenced  (FORWARD_NULL)
> /plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java:
1730 in com.cloud.hypervisor.hyperv.resource.HypervDirectConnectResource.postHttpRequest(java.lang.String,
java.net.URI)()
> 
> ** CID 1164009:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 3321 in com.cloud.vm.VirtualMachineManagerImpl.removeNicFromVm(com.cloud.vm.VirtualMachine,
com.cloud.vm.Nic)()
> 
> ** CID 1164010:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 3209 in com.cloud.vm.VirtualMachineManagerImpl.addVmToNetwork(com.cloud.vm.VirtualMachine,
com.cloud.network.Network, com.cloud.vm.NicProfile)()
> 
> ** CID 1164015:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 1308 in com.cloud.vm.VirtualMachineManagerImpl.advanceStop(java.lang.String,
boolean)()
> 
> ** CID 1164011:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 3830 in com.cloud.vm.VirtualMachineManagerImpl.reConfigureVm(java.lang.String,
com.cloud.offering.ServiceOffering, boolean)()
> 
> ** CID 1164008:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 1611 in com.cloud.vm.VirtualMachineManagerImpl.storageMigration(java.lang.String,
com.cloud.storage.StoragePool)()
> 
> ** CID 1164014:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 1985 in com.cloud.vm.VirtualMachineManagerImpl.migrateWithStorage(java.lang.String,
long, long, java.util.Map)()
> 
> ** CID 1164007:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 2279 in com.cloud.vm.VirtualMachineManagerImpl.advanceReboot(java.lang.String,
java.util.Map)()
> 
> ** CID 1164006:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 1703 in com.cloud.vm.VirtualMachineManagerImpl.migrate(java.lang.String,
long, com.cloud.deploy.DeployDestination)()
> 
> ** CID 1164005:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 3571 in com.cloud.vm.VirtualMachineManagerImpl.migrateForScale(java.lang.String,
long, com.cloud.deploy.DeployDestination, java.lang.Long)()
> 
> ** CID 1164004:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 766 in com.cloud.vm.VirtualMachineManagerImpl.advanceStart(java.lang.String,
java.util.Map, com.cloud.deploy.DeploymentPlan, com.cloud.deploy.DeploymentPlanner)()
> 
> ** CID 1164003:  Dereference after null check  (FORWARD_NULL)
> /plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/ServiceInstanceModel.java:
90 in org.apache.cloudstack.network.contrail.model.ServiceInstanceModel.<init>(net.juniper.contrail.api.types.Project,
java.lang.String, com.cloud.template.VirtualMachineTemplate, com.cloud.offering.ServiceOffering,
org.apache.cloudstack.network.contrail.model.VirtualNetworkModel, org.apache.cloudstack.network.contrail.model.VirtualNetworkModel)()
> 
> ** CID 1125352:  Dereference after null check  (FORWARD_NULL)
> /plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/VirtualMachineModel.java:
113 in org.apache.cloudstack.network.contrail.model.VirtualMachineModel.buildServiceInstance(org.apache.cloudstack.network.contrail.model.ModelController,
java.lang.String)()
> 
> 
> ________________________________________________________________________________________________________
> *** CID 1164002:  Logically dead code  (DEADCODE)
> /server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java: 388 in com.cloud.api.query.dao.TemplateJoinDaoImpl.searchByTemplateZonePair(java.lang.Boolean,
java.lang.String[])()
> 382             String batchCfg = _configDao.getValue("detail.batch.query.size");
> 383             if (batchCfg != null) {
> 384                 DETAILS_BATCH_SIZE = Integer.parseInt(batchCfg);
> 385             }
> 386             // query details by batches
> 387             Boolean isAscending = Boolean.parseBoolean(_configDao.getValue("sortkey.algorithm"));
>>>>    CID 1164002:  Logically dead code  (DEADCODE)
>>>>    Execution cannot reach this expression "true" inside statement "isAscending
= ((isAscending...".
> 388             isAscending = (isAscending == null ? true : isAscending);
> 389             Filter searchFilter = new Filter(TemplateJoinVO.class, "sortKey", isAscending,
null, null);
> 390             List<TemplateJoinVO> uvList = new ArrayList<TemplateJoinVO>();
> 391             // query details by batches
> 392             int curr_index = 0;
> 393             if (idPairs.length > DETAILS_BATCH_SIZE) {
> 
> ________________________________________________________________________________________________________
> *** CID 1164018:  Explicit null dereferenced  (FORWARD_NULL)
> /server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java: 730 in com.cloud.vm.snapshot.VMSnapshotManagerImpl.deleteAllVMSnapshots(long,
com.cloud.vm.snapshot.VMSnapshot$Type)()
> 724                     placeHolder = createPlaceHolderWork(vmId);
> 725                 }
> 726                 try {
> 727                     return orchestrateDeleteAllVMSnapshots(vmId, type);
> 728                 } finally {
> 729                     if (VmJobEnabled.value())
>>>>    CID 1164018:  Explicit null dereferenced  (FORWARD_NULL)
>>>>    Calling a method on null object "placeHolder".
> 730                         _workJobDao.expunge(placeHolder.getId());
> 731                 }
> 732     
> 733             } else {
> 734                 Outcome<VirtualMachine> outcome = deleteAllVMSnapshotsThroughJobQueue(vmId,
type);
> 735     
> 
> ________________________________________________________________________________________________________
> *** CID 1164020:  Explicit null dereferenced  (FORWARD_NULL)
> /server/src/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java: 478 in com.cloud.vm.snapshot.VMSnapshotManagerImpl.deleteVMSnapshot(java.lang.Long)()
> 472                     placeHolder = createPlaceHolderWork(vmSnapshot.getVmId());
> 473                 }
> 474                 try {
> 475                     return orchestrateDeleteVMSnapshot(vmSnapshotId);
> 476                 } finally {
> 477                     if (VmJobEnabled.value())
>>>>    CID 1164020:  Explicit null dereferenced  (FORWARD_NULL)
>>>>    Calling a method on null object "placeHolder".
> 478                         _workJobDao.expunge(placeHolder.getId());
> 479                 }
> 480             } else {
> 481                 Outcome<VMSnapshot> outcome = deleteVMSnapshotThroughJobQueue(vmSnapshot.getVmId(),
vmSnapshotId);
> 482     
> 483                 VMSnapshot result = null;
> 
> ________________________________________________________________________________________________________
> *** CID 1164017:  Explicit null dereferenced  (FORWARD_NULL)
> /server/src/com/cloud/storage/VolumeApiServiceImpl.java: 1619 in com.cloud.storage.VolumeApiServiceImpl.migrateVolume(org.apache.cloudstack.api.command.user.volume.MigrateVolumeCmd)()
> 1613                         placeHolder = createPlaceHolderWork(vm.getId());
> 1614                     }
> 1615                     try {
> 1616                         return orchestrateMigrateVolume(vol.getId(), destPool.getId(),
liveMigrateVolume);
> 1617                     } finally {
> 1618                         if (VmJobEnabled.value())
>>>>    CID 1164017:  Explicit null dereferenced  (FORWARD_NULL)
>>>>    Calling a method on null object "placeHolder".
> 1619                             _workJobDao.expunge(placeHolder.getId());
> 1620                     }
> 1621     
> 1622                 } else {
> 1623                     Outcome<Volume> outcome = migrateVolumeThroughJobQueue(vm.getId(),
vol.getId(), destPool.getId(), liveMigrateVolume);
> 1624     
> 
> ________________________________________________________________________________________________________
> *** CID 1164019:  Explicit null dereferenced  (FORWARD_NULL)
> /server/src/com/cloud/storage/VolumeApiServiceImpl.java: 1721 in com.cloud.storage.VolumeApiServiceImpl.takeSnapshot(java.lang.Long,
java.lang.Long, java.lang.Long, com.cloud.user.Account, boolean)()
> 1715                         placeHolder = createPlaceHolderWork(vm.getId());
> 1716                     }
> 1717                     try {
> 1718                         return orchestrateTakeVolumeSnapshot(volumeId, policyId,
snapshotId, account, quiescevm);
> 1719                     } finally {
> 1720                         if (VmJobEnabled.value())
>>>>    CID 1164019:  Explicit null dereferenced  (FORWARD_NULL)
>>>>    Calling a method on null object "placeHolder".
> 1721                             _workJobDao.expunge(placeHolder.getId());
> 1722                     }
> 1723     
> 1724                 } else {
> 1725                     Outcome<Snapshot> outcome = takeVolumeSnapshotThroughJobQueue(vm.getId(),
volumeId, policyId, snapshotId, account.getId(), quiescevm);
> 1726     
> 
> ________________________________________________________________________________________________________
> *** CID 1164016:  Dereference after null check  (FORWARD_NULL)
> /server/src/com/cloud/storage/VolumeApiServiceImpl.java: 2033 in com.cloud.storage.VolumeApiServiceImpl.sendAttachVolumeCommand(com.cloud.vm.UserVmVO,
com.cloud.storage.VolumeVO, java.lang.Long)()
> 2027     
> 2028                     throw new CloudRuntimeException(e.getMessage());
> 2029                 }
> 2030             }
> 2031     
> 2032             if (sendCommand) {
>>>>    CID 1164016:  Dereference after null check  (FORWARD_NULL)
>>>>    Calling a method on null object "volumeToAttachStoragePool".
> 2033                 if (host.getHypervisorType() == HypervisorType.KVM &&
> 2034                     volumeToAttachStoragePool.isManaged() &&
> 2035                     volumeToAttach.getPath() == null) {
> 2036                     volumeToAttach.setPath(volumeToAttach.get_iScsiName());
> 2037     
> 2038                     _volsDao.update(volumeToAttach.getId(), volumeToAttach);
> 
> ________________________________________________________________________________________________________
> *** CID 1164013:  Dereference after null check  (FORWARD_NULL)
> /plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/VirtualNetworkModel.java:
535 in org.apache.cloudstack.network.contrail.model.VirtualNetworkModel.compare(org.apache.cloudstack.network.contrail.model.ModelController,
org.apache.cloudstack.network.contrail.model.ModelObject)()
> 529             ObjectReference<VirtualNetworkPolicyType> ref2 = latestPolicyRefs.get(0);
> 530     
> 531             if ((ref1 != null && ref2 == null) || (ref1 == null &&
ref2 != null)) {
> 532                 return false;
> 533             }
> 534     
>>>>    CID 1164013:  Dereference after null check  (FORWARD_NULL)
>>>>    Calling a method on null object "ref1".
> 535             if ((ref1.getUuid() != null && ref2.getUuid() == null) || (ref1.getUuid()
== null && ref2.getUuid() != null)) {
> 536                 return false;
> 537             }
> 538             if (ref1.getUuid() == null && ref2.getUuid() == null) {
> 539                 return true;
> 540             }
> 
> ________________________________________________________________________________________________________
> *** CID 1164012:  Explicit null dereferenced  (FORWARD_NULL)
> /plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java:
1730 in com.cloud.hypervisor.hyperv.resource.HypervDirectConnectResource.postHttpRequest(java.lang.String,
java.net.URI)()
> 1724                 // large data transfers
> 1725                 StringEntity cmdJson = new StringEntity(jsonCmd);
> 1726                 request.addHeader("content-type", "application/json");
> 1727                 request.setEntity(cmdJson);
> 1728                 s_logger.debug("Sending cmd to " + agentUri.toString()
> 1729                         + " cmd data:" + logMessage);
>>>>    CID 1164012:  Explicit null dereferenced  (FORWARD_NULL)
>>>>    Calling a method on null object "httpClient".
> 1730                 HttpResponse response = httpClient.execute(request);
> 1731     
> 1732                 // Unsupported commands will not route.
> 1733                 if (response.getStatusLine().getStatusCode() == HttpStatus.SC_NOT_FOUND)
{
> 1734                     String errMsg = "Failed to send : HTTP error code : " + response.getStatusLine().getStatusCode();
> 1735                     s_logger.error(errMsg);
> 
> ________________________________________________________________________________________________________
> *** CID 1164009:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 3321 in com.cloud.vm.VirtualMachineManagerImpl.removeNicFromVm(com.cloud.vm.VirtualMachine,
com.cloud.vm.Nic)()
> 3315                     placeHolder = createPlaceHolderWork(vm.getId());
> 3316                 }
> 3317                 try {
> 3318                     return orchestrateRemoveNicFromVm(vm, nic);
> 3319                 } finally {
> 3320                     if (VmJobEnabled.value())
>>>>    CID 1164009:  Explicit null dereferenced  (FORWARD_NULL)
>>>>    Calling a method on null object "placeHolder".
> 3321                         _workJobDao.expunge(placeHolder.getId());
> 3322                 }
> 3323     
> 3324             } else {
> 3325                 Outcome<VirtualMachine> outcome = removeNicFromVmThroughJobQueue(vm,
nic);
> 3326     
> 
> ________________________________________________________________________________________________________
> *** CID 1164010:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 3209 in com.cloud.vm.VirtualMachineManagerImpl.addVmToNetwork(com.cloud.vm.VirtualMachine,
com.cloud.network.Network, com.cloud.vm.NicProfile)()
> 3203                     placeHolder = createPlaceHolderWork(vm.getId());
> 3204                 }
> 3205                 try {
> 3206                     return orchestrateAddVmToNetwork(vm, network, requested);
> 3207                 } finally {
> 3208                     if (VmJobEnabled.value())
>>>>    CID 1164010:  Explicit null dereferenced  (FORWARD_NULL)
>>>>    Calling a method on null object "placeHolder".
> 3209                         _workJobDao.expunge(placeHolder.getId());
> 3210                 }
> 3211             } else {
> 3212                 Outcome<VirtualMachine> outcome = addVmToNetworkThroughJobQueue(vm,
network, requested);
> 3213     
> 3214                 try {
> 
> ________________________________________________________________________________________________________
> *** CID 1164015:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 1308 in com.cloud.vm.VirtualMachineManagerImpl.advanceStop(java.lang.String,
boolean)()
> 1302                     placeHolder = createPlaceHolderWork(vm.getId());
> 1303                 }
> 1304                 try {
> 1305                     orchestrateStop(vmUuid, cleanUpEvenIfUnableToStop);
> 1306                 } finally {
> 1307                     if (VmJobEnabled.value())
>>>>    CID 1164015:  Explicit null dereferenced  (FORWARD_NULL)
>>>>    Calling a method on null object "placeHolder".
> 1308                         _workJobDao.expunge(placeHolder.getId());
> 1309                 }
> 1310     
> 1311             } else {
> 1312                 Outcome<VirtualMachine> outcome = stopVmThroughJobQueue(vmUuid,
cleanUpEvenIfUnableToStop);
> 1313     
> 
> ________________________________________________________________________________________________________
> *** CID 1164011:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 3830 in com.cloud.vm.VirtualMachineManagerImpl.reConfigureVm(java.lang.String,
com.cloud.offering.ServiceOffering, boolean)()
> 3824                     placeHolder = createPlaceHolderWork(vm.getId());
> 3825                 }
> 3826                 try {
> 3827                     return orchestrateReConfigureVm(vmUuid, oldServiceOffering,
reconfiguringOnExistingHost);
> 3828                 } finally {
> 3829                     if (VmJobEnabled.value())
>>>>    CID 1164011:  Explicit null dereferenced  (FORWARD_NULL)
>>>>    Calling a method on null object "placeHolder".
> 3830                         _workJobDao.expunge(placeHolder.getId());
> 3831                 }
> 3832             } else {
> 3833                 Outcome<VirtualMachine> outcome = reconfigureVmThroughJobQueue(vmUuid,
oldServiceOffering, reconfiguringOnExistingHost);
> 3834     
> 3835                 VirtualMachine vm = null;
> 
> ________________________________________________________________________________________________________
> *** CID 1164008:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 1611 in com.cloud.vm.VirtualMachineManagerImpl.storageMigration(java.lang.String,
com.cloud.storage.StoragePool)()
> 1605                     placeHolder = createPlaceHolderWork(vm.getId());
> 1606                 }
> 1607                 try {
> 1608                     orchestrateStorageMigration(vmUuid, destPool);
> 1609                 } finally {
> 1610                     if (VmJobEnabled.value())
>>>>    CID 1164008:  Explicit null dereferenced  (FORWARD_NULL)
>>>>    Calling a method on null object "placeHolder".
> 1611                         _workJobDao.expunge(placeHolder.getId());
> 1612                 }
> 1613             } else {
> 1614                 Outcome<VirtualMachine> outcome = migrateVmStorageThroughJobQueue(vmUuid,
destPool);
> 1615     
> 1616                 try {
> 
> ________________________________________________________________________________________________________
> *** CID 1164014:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 1985 in com.cloud.vm.VirtualMachineManagerImpl.migrateWithStorage(java.lang.String,
long, long, java.util.Map)()
> 1979                     placeHolder = createPlaceHolderWork(vm.getId());
> 1980                 }
> 1981                 try {
> 1982                     orchestrateMigrateWithStorage(vmUuid, srcHostId, destHostId,
volumeToPool);
> 1983                 } finally {
> 1984                     if (VmJobEnabled.value())
>>>>    CID 1164014:  Explicit null dereferenced  (FORWARD_NULL)
>>>>    Calling a method on null object "placeHolder".
> 1985                         _workJobDao.expunge(placeHolder.getId());
> 1986                 }
> 1987     
> 1988             } else {
> 1989                 Outcome<VirtualMachine> outcome = migrateVmWithStorageThroughJobQueue(vmUuid,
srcHostId, destHostId, volumeToPool);
> 1990     
> 
> ________________________________________________________________________________________________________
> *** CID 1164007:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 2279 in com.cloud.vm.VirtualMachineManagerImpl.advanceReboot(java.lang.String,
java.util.Map)()
> 2273                     placeHolder = createPlaceHolderWork(vm.getId());
> 2274                 }
> 2275                 try {
> 2276                     orchestrateReboot(vmUuid, params);
> 2277                 } finally {
> 2278                     if (VmJobEnabled.value())
>>>>    CID 1164007:  Explicit null dereferenced  (FORWARD_NULL)
>>>>    Calling a method on null object "placeHolder".
> 2279                         _workJobDao.expunge(placeHolder.getId());
> 2280                 }
> 2281             } else {
> 2282                 Outcome<VirtualMachine> outcome = rebootVmThroughJobQueue(vmUuid,
params);
> 2283     
> 2284                 try {
> 
> ________________________________________________________________________________________________________
> *** CID 1164006:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 1703 in com.cloud.vm.VirtualMachineManagerImpl.migrate(java.lang.String,
long, com.cloud.deploy.DeployDestination)()
> 1697                     placeHolder = createPlaceHolderWork(vm.getId());
> 1698                 }
> 1699                 try {
> 1700                     orchestrateMigrate(vmUuid, srcHostId, dest);
> 1701                 } finally {
> 1702                     if (VmJobEnabled.value())
>>>>    CID 1164006:  Explicit null dereferenced  (FORWARD_NULL)
>>>>    Calling a method on null object "placeHolder".
> 1703                         _workJobDao.expunge(placeHolder.getId());
> 1704                 }
> 1705             } else {
> 1706                 Outcome<VirtualMachine> outcome = migrateVmThroughJobQueue(vmUuid,
srcHostId, dest);
> 1707     
> 1708                 try {
> 
> ________________________________________________________________________________________________________
> *** CID 1164005:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 3571 in com.cloud.vm.VirtualMachineManagerImpl.migrateForScale(java.lang.String,
long, com.cloud.deploy.DeployDestination, java.lang.Long)()
> 3565                     placeHolder = createPlaceHolderWork(vm.getId());
> 3566                 }
> 3567                 try {
> 3568                     orchestrateMigrateForScale(vmUuid, srcHostId, dest, oldSvcOfferingId);
> 3569                 } finally {
> 3570                     if (VmJobEnabled.value())
>>>>    CID 1164005:  Explicit null dereferenced  (FORWARD_NULL)
>>>>    Calling a method on null object "placeHolder".
> 3571                         _workJobDao.expunge(placeHolder.getId());
> 3572                 }
> 3573             } else {
> 3574                 Outcome<VirtualMachine> outcome = migrateVmForScaleThroughJobQueue(vmUuid,
srcHostId, dest, oldSvcOfferingId);
> 3575     
> 3576                 try {
> 
> ________________________________________________________________________________________________________
> *** CID 1164004:  Explicit null dereferenced  (FORWARD_NULL)
> /engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 766 in com.cloud.vm.VirtualMachineManagerImpl.advanceStart(java.lang.String,
java.util.Map, com.cloud.deploy.DeploymentPlan, com.cloud.deploy.DeploymentPlanner)()
> 760                     placeHolder = createPlaceHolderWork(vm.getId());
> 761                 }
> 762                 try {
> 763                     orchestrateStart(vmUuid, params, planToDeploy, planner);
> 764                 } finally {
> 765                     if (VmJobEnabled.value())
>>>>    CID 1164004:  Explicit null dereferenced  (FORWARD_NULL)
>>>>    Calling a method on null object "placeHolder".
> 766                         _workJobDao.expunge(placeHolder.getId());
> 767                 }
> 768             } else {
> 769                 Outcome<VirtualMachine> outcome = startVmThroughJobQueue(vmUuid,
params, planToDeploy);
> 770     
> 771                 try {
> 
> ________________________________________________________________________________________________________
> *** CID 1164003:  Dereference after null check  (FORWARD_NULL)
> /plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/ServiceInstanceModel.java:
90 in org.apache.cloudstack.network.contrail.model.ServiceInstanceModel.<init>(net.juniper.contrail.api.types.Project,
java.lang.String, com.cloud.template.VirtualMachineTemplate, com.cloud.offering.ServiceOffering,
org.apache.cloudstack.network.contrail.model.VirtualNetworkModel, org.apache.cloudstack.network.contrail.model.VirtualNetworkModel)()
> 84             _rightName = StringUtils.join(right.getVirtualNetwork().getQualifiedName(),
":");
> 85     
> 86             _templateName = template.getName();
> 87             _templateId = template.getUuid();
> 88             _templateUrl = template.getUrl();
> 89     
>>>>    CID 1164003:  Dereference after null check  (FORWARD_NULL)
>>>>    Calling a method on null object "project".
> 90             _projectId = project.getUuid();
> 91         }
> 92     
> 93         /**
> 94          * Create an empty ServiceInstance.
> 95          * @param uuid
> 
> ________________________________________________________________________________________________________
> *** CID 1125352:  Dereference after null check  (FORWARD_NULL)
> /plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/VirtualMachineModel.java:
113 in org.apache.cloudstack.network.contrail.model.VirtualMachineModel.buildServiceInstance(org.apache.cloudstack.network.contrail.model.ModelController,
java.lang.String)()
> 107                 siObj = (ServiceInstance) api.findById(ServiceInstance.class, serviceUuid);
> 108             } catch (IOException ex) {
> 109                 s_logger.warn("service-instance read", ex);
> 110                 throw new CloudRuntimeException("Unable to read service-instance
object", ex);
> 111             }
> 112             ServiceInstanceModel siModel;
>>>>    CID 1125352:  Dereference after null check  (FORWARD_NULL)
>>>>    Comparing "siObj" to null implies that "siObj" might be null.
> 113             if (siObj == null) {
> 114                 siModel = new ServiceInstanceModel(serviceUuid);
> 115                 siModel.build(controller, siObj);
> 116                 manager.getDatabase().getServiceInstances().add(siModel);
> 117             } else {
> 118                 String fqn = StringUtils.join(siObj.getQualifiedName(), ':');
> 
> 
> ________________________________________________________________________________________________________
> To view the defects in Coverity Scan visit, http://scan.coverity.com/projects/943?tab=Overview
> 
> To unsubscribe from the email notification for new defects, http://scan5.coverity.com/cgi-bin/unsubscribe.py
> 
> 
> 

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message