debuggers.hg

changeset 22856:5429204f3c06

libxl: fix segfault on device assignement

Fix a xl/libxl segfault when assigning a device to the guest (bug
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1713).

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Stefano Stabellini <stefano.stabellini@eu.citrix.com>
date Tue Jan 25 18:22:09 2011 +0000 (2011-01-25)
parents 1d1eec7e1fb4
children b457e2520074
files tools/libxl/libxl_pci.c
line diff
     1.1 --- a/tools/libxl/libxl_pci.c	Tue Jan 25 18:09:49 2011 +0000
     1.2 +++ b/tools/libxl/libxl_pci.c	Tue Jan 25 18:22:09 2011 +0000
     1.3 @@ -268,7 +268,7 @@ static int libxl_create_pci_backend(libx
     1.4      for (i = 0; i < num; i++, pcidev++)
     1.5          libxl_create_pci_backend_device(gc, back, i, pcidev);
     1.6  
     1.7 -    flexarray_vappend(back, "num_devs", libxl__sprintf(gc, "%d", num));
     1.8 +    flexarray_vappend(back, "num_devs", libxl__sprintf(gc, "%d", num), NULL);
     1.9  
    1.10      flexarray_vappend(front,
    1.11                        "backend-id", libxl__sprintf(gc, "%d", 0),