JG> +static void cleanup_domain_list(virDomainPtr *list, int size)
JG> +{
JG> + int i;
JG> +
JG> + for (i = 0; i < size; i++) {
JG> + virDomainFree(list[i]);
JG> + }
JG> +}
This should be in misc_util with the other domain_list functions.
JG> @@ -221,15 +409,34 @@ static CMPI_THREAD_RETURN lifecycle_thre
JG> conn,
JG> virDomainGetName(prev_list[i]),
JG> CS_DELETED);
JG> - virDomainFree(prev_list[i]);
JG> }
Was this intentional? Cleaning up the list as we go prevents us from
having to go back through it again. I'm not sure if I see the items
used later, so it seems like we could eliminate the second trip
through with cleanup_domain_list().
JG> + /* Should I free args as well here, since it's malloced in activate?
*/
Yes :)
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms(a)us.ibm.com