diff options
author | Peter Maydell | 2018-11-06 12:32:14 +0100 |
---|---|---|
committer | Peter Maydell | 2018-11-06 12:32:14 +0100 |
commit | 76a82ced1184f26c1e2426938241442d80b1c13e (patch) | |
tree | b9995bbf6e276785b37ea5e21ad433dfae617ceb /memory_mapping.c | |
parent | milkymist: Check for failure trying to load BIOS image (diff) | |
download | qemu-76a82ced1184f26c1e2426938241442d80b1c13e.tar.gz qemu-76a82ced1184f26c1e2426938241442d80b1c13e.tar.xz qemu-76a82ced1184f26c1e2426938241442d80b1c13e.zip |
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 <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20181105151132.13884-1-peter.maydell@linaro.org
Diffstat (limited to 'memory_mapping.c')
0 files changed, 0 insertions, 0 deletions