projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
538a467
)
hostmem-file: plug a small leak
author
Marc-André Lureau
<marcandre.lureau@redhat.com>
Wed, 13 Apr 2016 16:57:40 +0000
(18:57 +0200)
committer
Markus Armbruster
<armbru@redhat.com>
Fri, 15 Apr 2016 15:56:06 +0000
(17:56 +0200)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <
1460566660
-19241-1-git-send-email-marcandre.lureau@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
backends/hostmem-file.c
patch
|
blob
|
history
diff --git
a/backends/hostmem-file.c
b/backends/hostmem-file.c
index b17a1f10a2d5c0491b9798cdfaebc73c45dfbc6d..5c4b808c1ac8979768ec0f2d14b749529fc3f86c 100644
(file)
--- 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),
};