]> Git Repo - qemu.git/commit
hw/arm/exynos4210: Zero memory allocated for Exynos4210State
authorPeter Maydell <[email protected]>
Tue, 6 Nov 2018 11:32:14 +0000 (11:32 +0000)
committerPeter Maydell <[email protected]>
Tue, 6 Nov 2018 11:32:14 +0000 (11:32 +0000)
commit76a82ced1184f26c1e2426938241442d80b1c13e
treeb9995bbf6e276785b37ea5e21ad433dfae617ceb
parent40af11eb7f80aac6c45d75e4fa6fa71ff930c651
hw/arm/exynos4210: Zero memory allocated for Exynos4210State

In exynos4210_init() we allocate memory for an Exynos4210State
struct. Generally devices can assume that the memory allocated
for their state struct is zero-initialized; we broke that
assumption here by using g_new(). Use g_new0() instead.
(In particular, some code assumes that the various irq arrays
in the Exynos4210Irq sub-struct are zero-initialized.)

In the longer term, this code should be QOMified, and then
the struct memory will be allocated elsewhere and by functions
which always zero-initalize it; but for 3.1 this is a
simple fix.

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20181105151132[email protected]
hw/arm/exynos4210.c
This page took 0.024599 seconds and 4 git commands to generate.