Re: [PATCH v2] tools/libs/light: don't touch nr_vcpus_out if listing vcpus and returning NULL

2022-01-28 Thread Anthony PERARD
On Fri, Jan 28, 2022 at 09:48:05AM +0100, Dario Faggioli wrote: > If we are in libxl_list_vcpu() and we are returning NULL, let's avoid > touching the output parameter *nr_vcpus_out, which the caller should > have initialized to 0. > > The current behavior could be problematic if are creating a

[PATCH v2] tools/libs/light: don't touch nr_vcpus_out if listing vcpus and returning NULL

2022-01-28 Thread Dario Faggioli
If we are in libxl_list_vcpu() and we are returning NULL, let's avoid touching the output parameter *nr_vcpus_out, which the caller should have initialized to 0. The current behavior could be problematic if are creating a domain and, in the meantime, an existing one is destroyed when we have