debuggers.hg

changeset 21047:f0777eafb73b

xl: Fix undefined behaviour when pci not specified in input file

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Mar 05 14:35:44 2010 +0000 (2010-03-05)
parents 3138b3885999
children 87ed57b6e4cd
files tools/libxl/xl.c
line diff
     1.1 --- a/tools/libxl/xl.c	Fri Mar 05 14:35:09 2010 +0000
     1.2 +++ b/tools/libxl/xl.c	Fri Mar 05 14:35:44 2010 +0000
     1.3 @@ -590,7 +590,7 @@ skip_vfb:
     1.4      if (!xlu_cfg_get_long (config, "pci_power_mgmt", &l))
     1.5          pci_power_mgmt = l;
     1.6  
     1.7 -    if (xlu_cfg_get_list (config, "pci", &pcis, 0)) {
     1.8 +    if (!xlu_cfg_get_list (config, "pci", &pcis, 0)) {
     1.9          *num_pcidevs = 0;
    1.10          *pcidevs = NULL;
    1.11          while ((buf = xlu_cfg_get_listitem (pcis, *num_pcidevs)) != NULL) {