arm: five simple memory leak fixes
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | target/arm: Free name string in ARMCPRegInfo hashtable entriestarget/ | +15 | 2 replies | |
| 2/5 | hw/arm/mps2-tz.c: Free mscname string in make_dma()hw/ | +1 | 2 replies | |
| 3/5 | hw/sd/sdhci: Don't leak memory region in sdhci_sysbus_realize()hw/ | +1 | 2 replies | |
| 4/5 | tests/test-arm-mptimer: Don't leak string memorytests/ | +69 | 2 replies | |
| 5/5 | target/arm: Create timers in realize, not inittarget/ | +9 | 1 reply |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Richard Henderson | Philippe Mathieu-Daudé |
|---|---|---|
| 1/5 | R-b | R-b |
| 2/5 | R-b | R-b |
| 3/5 | R-b | R-b |
| 4/5 | R-b | R-b |
| 5/5 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-arm] [PATCH 0/5] arm: five simple memory leak fixes
I ran 'make check' with the clang sanitizers enabled, which it turns out these days includes LeakSanitizer. That points out a fair number of memory leaks, most of which are not terribly significant. This patchset fixes five of them (there are plenty more to do).
The "device does timer_new() in its instance_init function" leak seems to be a common one with multiple other devices showing up as having the same problem. Switching timer_init() is probably a nicer fix than just moving timer_new() to realize, but I wasn't sure if going from VMSTATE_TIMER_PTR to VMSTATE_TIMER would be a migration compat break.
thanks
-- PMM
Peter Maydell (5):
target/arm: Free name string in ARMCPRegInfo hashtable entries hw/arm/mps2-tz.c: Free mscname string in make_dma() hw/sd/sdhci: Don't leak memory region in sdhci_sysbus_realize() tests/test-arm-mptimer: Don't leak string memory target/arm: Create timers in realize, not init
hw/arm/mps2-tz.c | 1 + hw/sd/sdhci.c | 5 +- target/arm/cpu.c | 33 ++++++--- tests/test-arm-mptimer.c | 153 ++++++++++++++++++--------------------- 4 files changed, 95 insertions(+), 97 deletions(-)
Signature · 1 line
2.19.2