All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xenpm: Initialize cputopo pointer
@ 2015-05-13 17:37 Boris Ostrovsky
  2015-05-14  3:02 ` Wei Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Boris Ostrovsky @ 2015-05-13 17:37 UTC (permalink / raw)
  To: ian.jackson, ian.campbell, wei.liu2, stefano.stabellini
  Cc: olaf, boris.ostrovsky, xen-devel

Commit 250f0b43af1a ("libxl/libxc: Move libxl_get_cpu_topology()'s
hypercall buffer management to libxc") broke non-debug compilation:
on error path we may have uninitialized cputopo pointer.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reported-by: Olaf Hering <olaf@aepfle.de>
---
 tools/misc/xenpm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/misc/xenpm.c b/tools/misc/xenpm.c
index 24ee6ef..fe2c001 100644
--- a/tools/misc/xenpm.c
+++ b/tools/misc/xenpm.c
@@ -355,7 +355,7 @@ static void signal_int_handler(int signo)
     int i, j, k;
     struct timeval tv;
     int cx_cap = 0, px_cap = 0;
-    xc_cputopo_t *cputopo;
+    xc_cputopo_t *cputopo = NULL;
     unsigned max_cpus;
 
     if ( xc_cputopoinfo(xc_handle, &max_cpus, NULL) != 0 )
@@ -960,7 +960,7 @@ void scaling_governor_func(int argc, char *argv[])
 
 void cpu_topology_func(int argc, char *argv[])
 {
-    xc_cputopo_t *cputopo;
+    xc_cputopo_t *cputopo = NULL;
     unsigned max_cpus;
     int i, rc;
 
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-14 10:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-13 17:37 [PATCH] xenpm: Initialize cputopo pointer Boris Ostrovsky
2015-05-14  3:02 ` Wei Liu
2015-05-14 10:34   ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.