[PATCH] libxl: avoid a dereference of a null pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/libxl/libxl_driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 91da438..bbc3059 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -3016,7 +3016,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:
-- 
1.7.5.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]