mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
xl: fix double free of domain names
Assigning malloc'd variables from one structure to another when both of them are free'd via destructors is a bad idea. Let's use a strdup. Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
This commit is contained in:
1 parent
28f32f5c3c
commit
8ec7facba3
1 file changed
+1
-1
@@ -296,7 +296,7 @@ static void init_dm_info(libxl_device_model_info *dm_info,
|
||||
|
||||
libxl_uuid_generate(&dm_info->uuid);
|
||||
|
||||
dm_info->dom_name = c_info->name;
|
||||
dm_info->dom_name = strdup(c_info->name);
|
||||
dm_info->device_model = strdup("qemu-dm");
|
||||
dm_info->videoram = b_info->video_memkb / 1024;
|
||||
dm_info->apic = b_info->u.hvm.apic;
|
||||
|
||||