qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] ppc: fix memory leaks
@ 2017-06-06 15:22 Greg Kurz
  2017-06-06 15:22 ` [Qemu-devel] [PATCH 1/3] target/ppc: pass const pointer to kvmppc_is_mem_backend_page_size_ok() Greg Kurz
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Greg Kurz @ 2017-06-06 15:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Thomas Huth, qemu-ppc, qemu-stable, David Gibson

Coverity just reported a memory leak introduced by this commit (QEMU 2.9):

commit df58713396f8b2deb923e39c00b10744c5c63909
Author: Thomas Huth <thuth@redhat.com>
Date:   Wed Feb 15 10:21:44 2017 +0100

    hw/ppc/spapr: Check for valid page size when hot plugging memory

It boils down to the fact that object_property_get_str() returns a string
allocated with g_strdup(), which must be deallocated with g_free() at some
point.

--
Greg

---

Greg Kurz (3):
      target/ppc: pass const pointer to kvmppc_is_mem_backend_page_size_ok()
      target/ppc: fix memory leak in kvmppc_is_mem_backend_page_size_ok()
      spapr: fix memory leak in spapr_memory_pre_plug()


 hw/ppc/spapr.c       |    5 ++++-
 target/ppc/kvm.c     |    5 +++--
 target/ppc/kvm_ppc.h |    2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)

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

end of thread, other threads:[~2017-06-07  5:45 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-06 15:22 [Qemu-devel] [PATCH 0/3] ppc: fix memory leaks Greg Kurz
2017-06-06 15:22 ` [Qemu-devel] [PATCH 1/3] target/ppc: pass const pointer to kvmppc_is_mem_backend_page_size_ok() Greg Kurz
2017-06-06 15:33   ` Philippe Mathieu-Daudé
2017-06-06 15:34   ` Thomas Huth
2017-06-06 15:46   ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2017-06-06 16:12   ` [Qemu-devel] [PATCH v2] target/ppc: pass const string " Greg Kurz
2017-06-06 16:34     ` Thomas Huth
2017-06-06 15:22 ` [Qemu-devel] [PATCH 2/3] target/ppc: fix memory leak in kvmppc_is_mem_backend_page_size_ok() Greg Kurz
2017-06-06 15:28   ` Peter Maydell
2017-06-06 15:41     ` Greg Kurz
2017-06-06 15:43       ` Peter Maydell
2017-06-06 15:41   ` Thomas Huth
2017-06-06 15:22 ` [Qemu-devel] [PATCH 3/3] spapr: fix memory leak in spapr_memory_pre_plug() Greg Kurz
2017-06-06 15:43   ` Thomas Huth
2017-06-06 15:55     ` Greg Kurz
2017-06-06 23:45 ` [Qemu-devel] [PATCH 0/3] ppc: fix memory leaks David Gibson
2017-06-07  5:45   ` Greg Kurz

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