Skip to contentSkip to conversation

hostmem-file: plug a small leak

GIT PULL Applied Markus Armbruster 2 participants 3 messages Apr 15, 2016 Arm STM32

lore
Share & tools
lore
#0 lore raw

The following changes since commit 538a467329818ea831f602491ac62d7d7999102a:

Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging (2016-04-15 10:49:04 +0100)

are available in the git repository at:

git://repo.or.cz/qemu/armbru.git tags/pull-backends-2016-04-15

for you to fetch changes up to bc78a01319b689f9214d589b0ec48a9116b440ec:

hostmem-file: plug a small leak (2016-04-15 17:56:06 +0200)

----------------------------------------------------------------
hostmem-file: plug a small leak

----------------------------------------------------------------
Marc-André Lureau (1):
hostmem-file: plug a small leak

 backends/hostmem-file.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Marc-André Lureau (1):
hostmem-file: plug a small leak

 backends/hostmem-file.c | 8 ++++++++
 1 file changed, 8 insertions(+)
Signature · 1 line
2.5.5
#1 lore raw

From: Marc-André Lureau <[email protected]>

Message-Id: <[email protected]>

---
 backends/hostmem-file.c | 8 ++++++++
 1 file changed, 8 insertions(+)
backends/hostmem-file.c +8 -0
index b17a1f1..5c4b808 100644
@@ -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),
 };
 
Signature · 1 line
2.5.5
#2 lore raw
In reply to Markus Armbruster
Quoted 6 lines · Markus Armbruster

The following changes since commit 538a467329818ea831f602491ac62d7d7999102a:

Merge remote-tracking branch 'remotes/mcayland/tags/qemu-sparc-signed' into staging (2016-04-15 10:49:04 +0100)

are available in the git repository at:

Quoted 9 lines

git://repo.or.cz/qemu/armbru.git tags/pull-backends-2016-04-15

for you to fetch changes up to bc78a01319b689f9214d589b0ec48a9116b440ec:

hostmem-file: plug a small leak (2016-04-15 17:56:06 +0200)

----------------------------------------------------------------
hostmem-file: plug a small leak

Applied, thanks.

-- PMM