]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Ensure max_id is initialized in linuxParseCPUmap()
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 7 Mar 2012 11:41:34 +0000 (11:41 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 7 Mar 2012 11:41:34 +0000 (11:41 +0000)
src/nodeinfo.c

index 709e94a4a62d8c098c8936febbee92412ee30635..61a59256f61d76617724fca8795632b06d8d50a4 100644 (file)
@@ -581,7 +581,7 @@ linuxParseCPUmap(int *max_cpuid, const char *path)
 {
     char *map = NULL;
     char *str = NULL;
-    int max_id, i;
+    int max_id = 0, i;
 
     if (virFileReadAll(path, 5 * VIR_DOMAIN_CPUMASK_LEN, &str) < 0) {
         virReportOOMError();