KR> + port_list.list = malloc(count * sizeof(struct vnc_port *));
KR> + if (!port_list.list) {
Our CodingStyle says that this should be:
if (port_list.list == NULL)
KR> + port_list.list[i] = malloc(sizeof(struct vnc_port));
KR> + if (!port_list.list[i]) {
Here too.
KR> + port_list.list[port_list.cur]->name =
strdup(dominfo->name);
Your free() call later will handle this, but will other code expect
'name' to be non-NULL in the case of an allocation failure?
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms(a)us.ibm.com