
11 Nov
2011
11 Nov
'11
6:05 p.m.
On Thu, Nov 10, 2011 at 9:33 PM, Christophe Fergeau <cfergeau@redhat.com> 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