Hide Forgot
Description of problem: File: src/libxl/libxl_driver.c Location: line 3017, column 17 Description: Field access results in a dereference of a null pointer (loaded from variable 'l_disk') 2979 static int 2980 libxlDomainDetachDeviceDiskLive(libxlDomainObjPrivatePtr priv, 2981 virDomainObjPtr vm, virDomainDeviceDefPtr dev) 2982 { 2983 virDomainDiskDefPtr l_disk = NULL; Notes: Variable 'l_disk' initialized to a null pointer value. 2989 switch (dev->data.disk->device) { Notes: Control jumps to 'case VIR_DOMAIN_DISK_DEVICE_DISK:' at line 2990 2990 case VIR_DOMAIN_DISK_DEVICE_DISK: 2991 if (dev->data.disk->bus == VIR_DOMAIN_DISK_BUS_XEN) { Notes: Taking false branch 3016 } else { 3017 libxlError(VIR_ERR_CONFIG_UNSUPPORTED, 3018 _("disk bus '%s' cannot be hot unplugged."), 3019 virDomainDiskBusTypeToString(l_disk->bus)); Notes: Within the expansion of the macro 'libxlError': Field access results in a dereference of a null pointer (loaded from variable 'l_disk') Version-Release number of selected component (if applicable): libvirt upstream. How reproducible: always Steps to Reproduce: 1. directly analyze libvirt soure codes or using static codes analysis tool such as clang. 2. 3. Actual results: Expected results: Avoid a dereference of a null pointer. Additional info:
Patch for upstream and wait for developers review: http://www.redhat.com/archives/libvir-list/2011-September/msg00265.html Alex