Skip to content

Commit 8c387f9

Browse files
authored
vmware: fix potential NPE when memory hotplug capability is checked (apache#3362)
This fixes potential NPE case when memory hotpluggability is checked based on the guest OS descriptor. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent f6f381f commit 8c387f9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3281,7 +3281,7 @@ public boolean isMemoryHotAddSupported(String guestOsId) throws Exception {
32813281
virtualHardwareVersion = getVirtualHardwareVersion();
32823282

32833283
// Check if guest operating system supports memory hotadd
3284-
if (guestOsDescriptor.isSupportsMemoryHotAdd()) {
3284+
if (guestOsDescriptor != null && guestOsDescriptor.isSupportsMemoryHotAdd()) {
32853285
guestOsSupportsMemoryHotAdd = true;
32863286
}
32873287
// Check if virtual machine is using hardware version 7 or later.

0 commit comments

Comments
 (0)