On Thu, Nov 10, 2011 at 9:33 PM, Christophe Fergeau <[email protected]> wrote:
>  devices = g_list_append(devices, disk);
> +    gvir_config_domain_set_devices(domain, devices);
> +    g_list_free(devices);
> +    devices = NULL;


Hmm, I realize this is a bit more tricky. You give up devices element
owner ship but no the container.. I think this is bad, as the list
contains invalid objects after leaving the functions. Insead, the
set_devices () function should ref the element, and the caller should
unref too with g_list_free_full (devices, g_object_unref)


-- 
Marc-André Lureau

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to