All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hostmem-file: plug a small leak
@ 2016-04-13 16:57 marcandre.lureau
  2016-04-14 11:34 ` Igor Mammedov
  0 siblings, 1 reply; 7+ messages in thread
From: marcandre.lureau @ 2016-04-13 16:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 backends/hostmem-file.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c
index b17a1f1..5c4b808 100644
--- a/backends/hostmem-file.c
+++ b/backends/hostmem-file.c
@@ -121,11 +121,19 @@ file_backend_instance_init(Object *o)
                             set_mem_path, NULL);
 }
 
+static void file_backend_instance_finalize(Object *o)
+{
+    HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(o);
+
+    g_free(fb->mem_path);
+}
+
 static const TypeInfo file_backend_info = {
     .name = TYPE_MEMORY_BACKEND_FILE,
     .parent = TYPE_MEMORY_BACKEND,
     .class_init = file_backend_class_init,
     .instance_init = file_backend_instance_init,
+    .instance_finalize = file_backend_instance_finalize,
     .instance_size = sizeof(HostMemoryBackendFile),
 };
 
-- 
2.5.5

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

end of thread, other threads:[~2016-04-15 13:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13 16:57 [Qemu-devel] [PATCH] hostmem-file: plug a small leak marcandre.lureau
2016-04-14 11:34 ` Igor Mammedov
2016-04-14 13:24   ` Paolo Bonzini
2016-04-14 15:44     ` Igor Mammedov
2016-04-14 17:26       ` Paolo Bonzini
2016-04-15  6:56         ` Markus Armbruster
2016-04-15 13:49           ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.