[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] ioemu: Initialize ioport_opaque to zero



ioemu: Initialize ioport_opaque to zero
since register_ioport_read requires it.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>

diff -r b3c8dcb98543 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Wed Mar 19 16:25:52 2008 +0000
+++ b/tools/ioemu/vl.c  Wed Mar 19 17:01:36 2008 +0000
@@ -281,7 +281,7 @@ void default_ioport_writel(void *opaque,
 
 void init_ioports(void)
 {
-    ioport_opaque = malloc(MAX_IOPORTS * sizeof(*ioport_opaque));
+    ioport_opaque = calloc(MAX_IOPORTS, sizeof(*ioport_opaque));
     ioport_read_table = malloc(3 * MAX_IOPORTS * sizeof(**ioport_read_table));
     ioport_write_table = malloc(3 * MAX_IOPORTS * 
sizeof(**ioport_write_table));
 }

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.