Signed-off-by: Xu Wang <gesaint(a)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 bfb1654..4e747f7 100644
--- a/src/Virt_VirtualSystemManagementService.c
+++ b/src/Virt_VirtualSystemManagementService.c
@@ -581,6 +581,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;
@@ -606,6 +607,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;
@@ -981,6 +984,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;
@@ -1102,6 +1108,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;
}
@@ -1126,6 +1135,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;
}
@@ -1466,6 +1478,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:
@@ -1495,6 +1510,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