KR> + port = malloc(sizeof(struct vnc_port));
Check your malloc() result.
KR> + port->name = strdup(dominfo->name);
Check your strdup() result.
KR> out:
KR> virConnectClose(conn);
KR> + free(port->name);
KR> + free(port);
KR> + port = NULL;
This "port = NULL" doesn't do anything, does it?
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms(a)us.ibm.com