cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scan-ad...@coverity.com
Subject New Defects reported by Coverity Scan for cloudstack
Date Mon, 29 Dec 2014 12:09:56 GMT

Hi,

Please find the latest report on new defect(s) introduced to cloudstack found with Coverity
Scan.

3 new defect(s) introduced to cloudstack found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)


** CID 1260703:  RC: Questionable use of reference equality rather than calling equals  (FB.RC_REF_COMPARISON)
/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 1764 in com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(java.lang.String,
com.cloud.storage.StoragePool)()

** CID 1260702:  Dereference null return value  (NULL_RETURNS)
/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLBHealthCheckPoliciesCmd.java:
100 in org.apache.cloudstack.api.command.user.loadbalancer.ListLBHealthCheckPoliciesCmd.execute()()

** CID 1260701:  Dereference null return value  (NULL_RETURNS)
/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java: 2277 in com.cloud.network.lb.LoadBalancingRulesManagerImpl.searchForLBHealthCheckPolicies(org.apache.cloudstack.api.command.user.loadbalancer.ListLBHealthCheckPoliciesCmd)()


________________________________________________________________________________________________________
*** CID 1260703:  RC: Questionable use of reference equality rather than calling equals  (FB.RC_REF_COMPARISON)
/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java: 1764 in com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(java.lang.String,
com.cloud.storage.StoragePool)()
1758                     vm.setPodIdToDeployIn(destPool.getPodId());
1759     
1760                     // If VM was cold migrated between clusters belonging to two different
VMware DCs,
1761                     // unregister the VM from the source host and cleanup the associated
VM files.
1762                     if (vm.getHypervisorType().equals(HypervisorType.VMware)) {
1763                         Long destClusterId = destPool.getClusterId();
>>>     CID 1260703:  RC: Questionable use of reference equality rather than calling
equals  (FB.RC_REF_COMPARISON)
>>>     Suspicious comparison of Long references
1764                         if (srcClusterId != null && destClusterId != null &&
srcClusterId != destClusterId) {
1765                             String srcDcName = _clusterDetailsDao.getVmwareDcName(srcClusterId);
1766                             String destDcName = _clusterDetailsDao.getVmwareDcName(destClusterId);
1767                             if (srcDcName != null && destDcName != null &&
!srcDcName.equals(destDcName)) {
1768                                 s_logger.debug("Since VM's storage was successfully migrated
across VMware Datacenters, unregistering VM: " + vm.getInstanceName() +
1769                                         " from source host: " + srcHost.getId());

________________________________________________________________________________________________________
*** CID 1260702:  Dereference null return value  (NULL_RETURNS)
/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLBHealthCheckPoliciesCmd.java:
100 in org.apache.cloudstack.api.command.user.loadbalancer.ListLBHealthCheckPoliciesCmd.execute()()
94                     lbRuleId = _lbService.findLBIdByHealtCheckPolicyId(hId);
95                 } else {
96                     throw new InvalidParameterValueException("Either LB Ruleid or HealthCheckpolicy
Id should be specified");
97                 }
98             }
99     
>>>     CID 1260702:  Dereference null return value  (NULL_RETURNS)
>>>     Unboxing null object "lbRuleId".
100             LoadBalancer lb = _lbService.findById(lbRuleId);
101             if (lb != null) {
102                 List<? extends HealthCheckPolicy> healthCheckPolicies = _lbService.searchForLBHealthCheckPolicies(this);
103                 LBHealthCheckResponse spResponse = _responseGenerator.createLBHealthCheckPolicyResponse(healthCheckPolicies,
lb);
104                 hcpResponses.add(spResponse);
105                 response.setResponses(hcpResponses);

________________________________________________________________________________________________________
*** CID 1260701:  Dereference null return value  (NULL_RETURNS)
/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java: 2277 in com.cloud.network.lb.LoadBalancingRulesManagerImpl.searchForLBHealthCheckPolicies(org.apache.cloudstack.api.command.user.loadbalancer.ListLBHealthCheckPoliciesCmd)()
2271             LoadBalancerVO loadBalancer = _lbDao.findById(loadBalancerId);
2272             if (loadBalancer == null) {
2273                 return null;
2274             }
2275     
2276             _accountMgr.checkAccess(caller, null, true, loadBalancer);
>>>     CID 1260701:  Dereference null return value  (NULL_RETURNS)
>>>     Unboxing null object "loadBalancerId".
2277             List<LBHealthCheckPolicyVO> hcDbpolicies = _lb2healthcheckDao.listByLoadBalancerIdAndDisplayFlag(loadBalancerId,
forDisplay);
2278     
2279             return hcDbpolicies;
2280         }
2281     
2282         @Override


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, http://scan.coverity.com/projects/943?tab=overview

To manage Coverity Scan email notifications for "dev@cloudstack.apache.org", click http://scan.coverity.com/subscriptions/edit?email=dev%40cloudstack.apache.org&token=494aabd5ba647999fa41b6d766646231
.


Mime
View raw message