summaryrefslogtreecommitdiffstats
path: root/target/riscv
diff options
context:
space:
mode:
authorPalmer Dabbelt2019-06-14 13:58:41 +0200
committerPalmer Dabbelt2019-06-24 08:44:42 +0200
commitc988de4119af0a0ae7983e870babb5f15793590e (patch)
tree798a2ff0b9b51042703e274e0b1c0045ab51004d /target/riscv
parentriscv: virt: Correct pci "bus-range" encoding (diff)
downloadqemu-c988de4119af0a0ae7983e870babb5f15793590e.tar.gz
qemu-c988de4119af0a0ae7983e870babb5f15793590e.tar.xz
qemu-c988de4119af0a0ae7983e870babb5f15793590e.zip
RISC-V: Fix a memory leak when realizing a sifive_e
Coverity pointed out a memory leak in riscv_sifive_e_soc_realize(), where a pair of recently added MemoryRegion instances would not be freed if there were errors elsewhere in the function. The fix here is to simply not use dynamic allocation for these instances: there's always one of each in SiFiveESoCState, so instead we just include them within the struct. Fixes: 30efbf330a45 ("SiFive RISC-V GPIO Device") Signed-off-by: Palmer Dabbelt <palmer@sifive.com> Suggested-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv')
0 files changed, 0 insertions, 0 deletions