[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Re: [PATCH] ioemu: Initialize ioport_opaque to zero
Samuel Thibault, le Wed 19 Mar 2008 17:02:59 +0000, a écrit : > ioemu: Initialize ioport_opaque to zero > since register_ioport_read requires it. Mmm, actually ioport_read/write_table need it too: ioemu: Initialize ioport_opaque, ioport_read/write_table to zero 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:05:03 2008 +0000 @@ -281,9 +281,9 @@ void default_ioport_writel(void *opaque, void init_ioports(void) { - ioport_opaque = malloc(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)); + ioport_opaque = calloc(MAX_IOPORTS, sizeof(*ioport_opaque)); + ioport_read_table = calloc(3 * MAX_IOPORTS, sizeof(**ioport_read_table)); + ioport_write_table = calloc(3 * MAX_IOPORTS, sizeof(**ioport_write_table)); } /* size is the word size in byte */ _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |