
Signed-off-by: Xu Wang <gesaint@linux.vnet.ibm.com> --- src/Virt_VirtualSystemManagementService.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c index 70ca1b7..cff4a1d 100644 --- a/src/Virt_VirtualSystemManagementService.c +++ b/src/Virt_VirtualSystemManagementService.c @@ -587,6 +587,7 @@ static bool default_graphics_device(struct domain *domain) domain->dev_graphics->dev.graphics.dev.vnc.host = strdup("127.0.0.1"); domain->dev_graphics->dev.graphics.dev.vnc.keymap = strdup("en-us"); domain->dev_graphics->dev.graphics.dev.vnc.passwd = NULL; + domain->dev_graphics->dev.graphics.others = NULL; domain->dev_graphics_ct = 1; return true; @@ -651,6 +652,8 @@ static bool default_input_device(struct domain *domain) domain->dev_input->dev.input.bus = strdup("ps2"); } + domain->dev_input->dev.input.others = NULL; + domain->dev_input_ct = 1; return true; @@ -1040,6 +1043,9 @@ static const char *net_rasd_to_vdev(CMPIInstance *inst, &dev->dev.net.limit) != CMPI_RC_OK) dev->dev.net.limit = 0; + cleanup_others(dev->dev.net.others); + dev->dev.net.others = NULL; + out: free(network); return msg; @@ -1161,6 +1167,9 @@ static const char *disk_rasd_to_vdev(CMPIInstance *inst, free(dev->id); dev->id = strdup(dev->dev.disk.virtual_dev); + cleanup_others(dev->dev.disk.others); + dev->dev.disk.others = NULL; + return NULL; } @@ -1185,6 +1194,9 @@ static const char *lxc_disk_rasd_to_vdev(CMPIInstance *inst, free(dev->id); dev->id = strdup(dev->dev.disk.virtual_dev); + cleanup_others(dev->dev.disk.others); + dev->dev.disk.others = NULL; + return NULL; } @@ -1772,6 +1784,9 @@ static const char *graphics_rasd_to_vdev(CMPIInstance *inst, goto out; } + cleanup_others(dev->dev.graphics.others); + dev->dev.graphics.others = NULL; + CU_DEBUG("graphics = %s", dev->id); out: @@ -1801,6 +1816,9 @@ static const char *input_rasd_to_vdev(CMPIInstance *inst, } else dev->dev.input.bus = strdup(val); + cleanup_others(dev->dev.input.others); + dev->dev.input.others = NULL; + out: return NULL; -- 1.7.1