incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject git commit: Fix potential nullpointer in recent KVM systemvm patchdisk update
Date Fri, 14 Sep 2012 22:27:00 GMT
Updated Branches:
  refs/heads/4.0 32e050ddc -> a88318063


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/a8831806
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/a8831806
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/a8831806

Branch: refs/heads/4.0
Commit: a8831806334c6802c488a120d667b9d59764a3e5
Parents: 32e050d
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:26:29 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/a8831806/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