[Libvirt-cim] [PATCH 1 of 2] Add Modified to the list of available indications in ComputerSystemIndication

Dan Smith danms at us.ibm.com
Tue Jan 22 15:26:41 UTC 2008


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 at us.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20080122/bc716d84/attachment.sig>


More information about the Libvirt-cim mailing list