[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxl: initialise nr_dom_vcpus to fix 4a6070ea9
commit a134aeaa17ad3618575fac86f27246a3b2466001 Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Mon Oct 24 11:11:15 2016 +0100 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Mon Oct 24 11:53:20 2016 +0100 libxl: initialise nr_dom_vcpus to fix 4a6070ea9 Clang complains nr_dom_vcpus may be used uninitialised after 4a6070ea9. The real issue is vinfo can be NULL and nr_dom_vcpus remains uninitialised if previous call fails. Initialise nr_dom_vcpus to 0 at the beginning of the loop to fix the issue. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Reviewed-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Release-acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/libxl/libxl_numa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_numa.c b/tools/libxl/libxl_numa.c index fd64c22..a8a75f8 100644 --- a/tools/libxl/libxl_numa.c +++ b/tools/libxl/libxl_numa.c @@ -206,8 +206,9 @@ static int nr_vcpus_on_nodes(libxl__gc *gc, libxl_cputopology *tinfo, for (i = 0; i < nr_doms; i++) { libxl_vcpuinfo *vinfo = NULL; + int nr_dom_vcpus = 0; libxl_cpupoolinfo cpupool_info; - int cpupool, nr_dom_vcpus; + int cpupool; libxl_cpupoolinfo_init(&cpupool_info); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |