aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-04-15 17:43:34 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-04-15 17:43:34 +0100
commitc7b45f12828c1ba7105dbc029c63d7de68eaa91c (patch)
tree8051237a8c04400402510461b05e63c9dfbbad6e
parent538a467329818ea831f602491ac62d7d7999102a (diff)
parentbc78a01319b689f9214d589b0ec48a9116b440ec (diff)
Merge remote-tracking branch 'remotes/armbru/tags/pull-backends-2016-04-15' into staging
hostmem-file: plug a small leak # gpg: Signature made Fri 15 Apr 2016 17:30:42 BST using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-backends-2016-04-15: hostmem-file: plug a small leak Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--backends/hostmem-file.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c
index b17a1f10a2..5c4b808c1a 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),
};