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

Re: [Xen-devel] [PATCH] libxl: do not try to detach pci device when none attached



Stefano Stabellini writes ("Re: [Xen-devel] [PATCH] libxl: do not try to detach 
pci device when none attached"):
> diff -r 37c77bacb52a tools/libxl/libxl_pci.c
> --- a/tools/libxl/libxl_pci.c Mon May 23 17:38:28 2011 +0100
> +++ b/tools/libxl/libxl_pci.c Fri Jun 10 10:39:05 2011 +0000
> @@ -1022,8 +1022,7 @@ int libxl_device_pci_list_assigned(libxl
>              } while ((p = strtok_r(NULL, ",=", &saveptr)) != NULL);
>          }
>      }
> -    if ( *num )
> -        *list = pcidevs;
> +    *list = pcidevs;

This patch looks correct to me, as far as it goes.

If n==0 then calloc is passed 0 and may return 0 willy-nilly but since
there's no error check this doesn't cause other trouble :-/.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.