projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14cd36c
)
libxl: correctly handle libxl_get_cpu_topology failure in libxl_{cpu, node}map_to_...
author
Matthew Daley
<mattjd@gmail.com>
Sun, 29 Sep 2013 05:47:37 +0000
(18:47 +1300)
committer
Ian Campbell
<ian.campbell@citrix.com>
Thu, 3 Oct 2013 13:45:54 +0000
(14:45 +0100)
Initialize nr_cpus to 0 so that if it is unchanged by a failing
libxl_get_cpu_topology, libxl_cputopology_list_free still works OK
afterward.
Coverity-ID:
1055294
Coverity-ID:
1055295
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Acked-by: Dario Faggioli <dario.faggioli@citrix.com>
tools/libxl/libxl_utils.c
patch
|
blob
|
history
diff --git
a/tools/libxl/libxl_utils.c
b/tools/libxl/libxl_utils.c
index 4309e5e345c561bf64c842e8c62b719949bfe5f4..244725bd7f7b3fcd103e477b8ea87936b8bd000a 100644
(file)
--- a/
tools/libxl/libxl_utils.c
+++ b/
tools/libxl/libxl_utils.c
@@
-650,7
+650,7
@@
int libxl_nodemap_to_cpumap(libxl_ctx *ctx,
libxl_bitmap *cpumap)
{
libxl_cputopology *tinfo = NULL;
- int nr_cpus, i, rc = 0;
+ int nr_cpus
= 0
, i, rc = 0;
tinfo = libxl_get_cpu_topology(ctx, &nr_cpus);
if (tinfo == NULL) {
@@
-673,7
+673,7
@@
int libxl_cpumap_to_nodemap(libxl_ctx *ctx,
libxl_bitmap *nodemap)
{
libxl_cputopology *tinfo = NULL;
- int nr_cpus, i, rc = 0;
+ int nr_cpus
= 0
, i, rc = 0;
tinfo = libxl_get_cpu_topology(ctx, &nr_cpus);
if (tinfo == NULL) {