1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

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>
This commit is contained in:
Alex Jia 2011-09-05 01:01:03 +08:00 committed by Eric Blake
parent 6977fd95bf
commit 4b4e4a69a8

View File

@ -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: