aboutsummaryrefslogtreecommitdiff
path: root/src/libxl
diff options
context:
space:
mode:
authorAlex Jia <ajia@redhat.com>2011-09-05 01:01:03 +0800
committerEric Blake <eblake@redhat.com>2011-09-08 11:00:30 +0100
commit4b4e4a69a8b31350c1f5ee911cab99f352b169ee (patch)
treeb56cc9d6b40e40483b40163942499942f8586a0b /src/libxl
parentblockinfo: fix qemu regression in handling disk name (diff)
downloadlibvirt-4b4e4a69a8b31350c1f5ee911cab99f352b169ee.tar.gz
libvirt-4b4e4a69a8b31350c1f5ee911cab99f352b169ee.tar.bz2
libvirt-4b4e4a69a8b31350c1f5ee911cab99f352b169ee.zip
libxl: avoid a dereference of a null pointer
Variable 'l_disk' initialized to a null pointer value, control jumps to 'case VIR_DOMAIN_DISK_DEVICE_DISK and then taking false branch, Within the expansion of the macro 'libxlError': Field access results in a dereference of a null pointer (loaded from variable 'l_disk'). * src/libxl/libxl_driver.c: Field access results in a dereference of a null pointer (loaded from variable 'l_disk') Signed-off-by: Alex Jia <ajia@redhat.com>
Diffstat (limited to 'src/libxl')
-rw-r--r--src/libxl/libxl_driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 4302c8be9..d324632b2 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -3017,7 +3017,7 @@ libxlDomainDetachDeviceDiskLive(libxlDomainObjPrivatePtr priv,
} else {
libxlError(VIR_ERR_CONFIG_UNSUPPORTED,
_("disk bus '%s' cannot be hot unplugged."),
- virDomainDiskBusTypeToString(l_disk->bus));
+ virDomainDiskBusTypeToString(dev->data.disk->bus));
}
break;
default: