mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
hostmem-file: plug a small leak
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>
This commit is contained in:
parent
538a467329
commit
bc78a01319
1 changed files with 8 additions and 0 deletions
|
@ -121,11 +121,19 @@ file_backend_instance_init(Object *o)
|
||||||
set_mem_path, NULL);
|
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 = {
|
static const TypeInfo file_backend_info = {
|
||||||
.name = TYPE_MEMORY_BACKEND_FILE,
|
.name = TYPE_MEMORY_BACKEND_FILE,
|
||||||
.parent = TYPE_MEMORY_BACKEND,
|
.parent = TYPE_MEMORY_BACKEND,
|
||||||
.class_init = file_backend_class_init,
|
.class_init = file_backend_class_init,
|
||||||
.instance_init = file_backend_instance_init,
|
.instance_init = file_backend_instance_init,
|
||||||
|
.instance_finalize = file_backend_instance_finalize,
|
||||||
.instance_size = sizeof(HostMemoryBackendFile),
|
.instance_size = sizeof(HostMemoryBackendFile),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue