diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-08-12 10:33:41 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-09-01 11:08:19 +0100 |
commit | cabc613f78fc0409ed3cd35994cd85ed3a0915f1 (patch) | |
tree | a494335a1723364ad5cec20291a19a94d637e2d1 /.gitlab | |
parent | 99abcbc7600c62c294e973db340adf6939932a93 (diff) | |
download | qemu-cabc613f78fc0409ed3cd35994cd85ed3a0915f1.zip qemu-cabc613f78fc0409ed3cd35994cd85ed3a0915f1.tar.gz qemu-cabc613f78fc0409ed3cd35994cd85ed3a0915f1.tar.bz2 |
hw/arm: Don't allocate separate MemoryRegions in stm32 SoC realize
In the realize methods of the stm32f100 and stm32f205 SoC objects, we
call g_new() to create new MemoryRegion objects for the sram, flash,
and flash_alias. This is unnecessary (and leaves open the
possibility of leaking the allocations if we exit from realize with
an error). Make these MemoryRegions member fields of the device
state struct instead, as stm32f405 already does.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alexandre Iooss <erdnaxe@crans.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Luc Michel <luc@lmichel.fr>
Message-id: 20210812093356.1946-11-peter.maydell@linaro.org
Diffstat (limited to '.gitlab')
0 files changed, 0 insertions, 0 deletions