cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [14/20] git commit: Fix potential nullpointer in recent KVM systemvm patchdisk update
Date Mon, 17 Sep 2012 22:32:03 GMT
Fix potential nullpointer in recent KVM systemvm patchdisk update

Signed-off-by: Edison Su <sudison@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/f52d37fb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/f52d37fb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/f52d37fb

Branch: refs/heads/javelin
Commit: f52d37fb532179e3afc25cdae904553f5f96c8d1
Parents: 0d3a2a3
Author: Marcus Sorensen <shadowsor@gmail.com>
Authored: Fri Sep 14 15:26:29 2012 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Fri Sep 14 15:27:23 2012 -0700

----------------------------------------------------------------------
 .../kvm/resource/LibvirtComputingResource.java     |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f52d37fb/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 9312519..65742d8 100755
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -2587,7 +2587,8 @@ public class LibvirtComputingResource extends ServerResourceBase implements
                     if (disk.getDeviceType() == DiskDef.deviceType.CDROM
                             && disk.getDiskPath() != null) {
                         cleanupDisk(conn, disk);
-                    } else if (disk.getDiskPath().contains(vmName + "-patchdisk") 
+                    } else if (disk.getDiskPath() != null 
+                            && disk.getDiskPath().contains(vmName + "-patchdisk")

                             && vmName.matches("^[rsv]-\\d+-VM$")) {
                         if (!_storagePoolMgr.deleteVbdByPath(disk.getDiskPath())) {
                             s_logger.warn("failed to delete patch disk " + disk.getDiskPath());


Mime
View raw message