Re: [Qemu-devel] [PATCH] RISC-V: Fix a memory leak when realizing a sifive_e

2019-06-17 Thread Alistair Francis
On Sun, Jun 16, 2019 at 1:15 AM Palmer Dabbelt wrote: > > On Fri, 14 Jun 2019 05:25:50 PDT (-0700), phi...@redhat.com wrote: > > On 6/14/19 2:08 PM, Palmer Dabbelt wrote: > >> Coverity pointed out a memory leak in riscv_sifive_e_soc_realize(), > >> where a pair of recently added MemoryRegion insta

Re: [Qemu-devel] [PATCH] RISC-V: Fix a memory leak when realizing a sifive_e

2019-06-16 Thread Palmer Dabbelt
On Fri, 14 Jun 2019 05:25:50 PDT (-0700), phi...@redhat.com wrote: On 6/14/19 2:08 PM, Palmer Dabbelt wrote: 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

Re: [Qemu-devel] [PATCH] RISC-V: Fix a memory leak when realizing a sifive_e

2019-06-14 Thread Philippe Mathieu-Daudé
On 6/14/19 2:08 PM, Palmer Dabbelt wrote: > 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 th

[Qemu-devel] [PATCH] RISC-V: Fix a memory leak when realizing a sifive_e

2019-06-14 Thread Palmer Dabbelt
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 SiFiv