qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/5] arm: five simple memory leak fixes
@ 2018-12-04 13:29 Peter Maydell
  2018-12-04 13:29 ` [Qemu-devel] [PATCH 1/5] target/arm: Free name string in ARMCPRegInfo hashtable entries Peter Maydell
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Peter Maydell @ 2018-12-04 13:29 UTC (permalink / raw)
  To: qemu-arm, qemu-devel; +Cc: patches

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(-)

-- 
2.19.2

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-12-04 17:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-04 13:29 [Qemu-devel] [PATCH 0/5] arm: five simple memory leak fixes Peter Maydell
2018-12-04 13:29 ` [Qemu-devel] [PATCH 1/5] target/arm: Free name string in ARMCPRegInfo hashtable entries Peter Maydell
2018-12-04 13:57   ` Richard Henderson
2018-12-04 14:25   ` Philippe Mathieu-Daudé
2018-12-04 13:29 ` [Qemu-devel] [PATCH 2/5] hw/arm/mps2-tz.c: Free mscname string in make_dma() Peter Maydell
2018-12-04 13:57   ` Richard Henderson
2018-12-04 14:26   ` Philippe Mathieu-Daudé
2018-12-04 13:29 ` [Qemu-devel] [PATCH 3/5] hw/sd/sdhci: Don't leak memory region in sdhci_sysbus_realize() Peter Maydell
2018-12-04 13:58   ` Richard Henderson
2018-12-04 14:29   ` Philippe Mathieu-Daudé
2018-12-04 13:29 ` [Qemu-devel] [PATCH 4/5] tests/test-arm-mptimer: Don't leak string memory Peter Maydell
2018-12-04 14:00   ` Richard Henderson
2018-12-04 17:08   ` Philippe Mathieu-Daudé
2018-12-04 13:29 ` [Qemu-devel] [PATCH 5/5] target/arm: Create timers in realize, not init Peter Maydell
2018-12-04 14:01   ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).