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>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
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 )
void cpu_topology_func(int argc, char *argv[])
{
- xc_cputopo_t *cputopo;
+ xc_cputopo_t *cputopo = NULL;
unsigned max_cpus;
int i, rc;