Hi,

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

2 new defect(s) introduced to cloudstack found with Coverity Scan.
16 defect(s), reported by Coverity Scan earlier, were marked fixed in the 
recent build analyzed by Coverity Scan.

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


** CID 1251370:  REC: RuntimeException capture  (FB.REC_CATCH_EXCEPTION)
/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServerStorageProcessor.java:
 1559 in 
com.cloud.hypervisor.xenserver.resource.XenServerStorageProcessor.createTemplateFromSnapshot(org.apache.cloudstack.storage.command.CopyCommand)()

** CID 1251369:  Dereference after null check  (FORWARD_NULL)
/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java: 323 in 
com.cloud.storage.snapshot.SnapshotManagerImpl.createSnapshot(java.lang.Long, 
java.lang.Long, java.lang.Long, com.cloud.user.Account)()


________________________________________________________________________________________________________
*** CID 1251370:  REC: RuntimeException capture  (FB.REC_CATCH_EXCEPTION)
/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/XenServerStorageProcessor.java:
 1559 in 
com.cloud.hypervisor.xenserver.resource.XenServerStorageProcessor.createTemplateFromSnapshot(org.apache.cloudstack.storage.command.CopyCommand)()
1553                 newTemplate.setPhysicalSize(physicalSize);
1554                 newTemplate.setName(templateUuid);
1555     
1556                 result = true;
1557     
1558                 return new CopyCmdAnswer(newTemplate);
>>>     CID 1251370:  REC: RuntimeException capture  (FB.REC_CATCH_EXCEPTION)
>>>     Catching RuntimeExceptions, perhaps unintentionally, with a catch block 
>>> for Exception
1559             } catch (Exception ex) {
1560                 s_logger.error("Failed to create a template from a 
snapshot", ex);
1561     
1562                 return new CopyCmdAnswer("Failed to create a template from 
a snapshot: " + ex.toString());
1563             } finally {
1564                 if (!result) {

________________________________________________________________________________________________________
*** CID 1251369:  Dereference after null check  (FORWARD_NULL)
/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java: 323 in 
com.cloud.storage.snapshot.SnapshotManagerImpl.createSnapshot(java.lang.Long, 
java.lang.Long, java.lang.Long, com.cloud.user.Account)()
317             if(snapshot != null)
318             {
319                 s_logger.debug("Failed to create snapshot");
320                 throw new CloudRuntimeException("Failed to create 
snapshot");
321             }
322             try {
>>>     CID 1251369:  Dereference after null check  (FORWARD_NULL)
>>>     Calling a method on null object "snapshot".
323                 postCreateSnapshot(volumeId, snapshot.getId(), policyId);
324                 //Check if the snapshot was removed while backingUp. If 
yes, do not log snapshot create usage event
325                 SnapshotVO freshSnapshot = 
_snapshotDao.findById(snapshot.getId());
326                 if (freshSnapshot != null)  {
327                     
UsageEventUtils.publishUsageEvent(EventTypes.EVENT_SNAPSHOT_CREATE, 
snapshot.getAccountId(), snapshot.getDataCenterId(), snapshotId, 
snapshot.getName(),
328                         null, null, volume.getSize(), 
snapshot.getClass().getName(), snapshot.getUuid());


________________________________________________________________________________________________________
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



Reply via email to