+2008-10-20 Dan Williams <dcbw@redhat.com>
+
+ * src/dhcp-manager/nm-dhcp-manager.c
+ - (nm_dhcp_manager_get): fix mismatched refcount; creating the dhcp
+ manager object already refs it once
+ - (nm_dhcp_manager_cancel_transaction_real): clear freed variables that
+ also get cleaned up by nm_dhcp_device_destroy() to prevent
+ double-frees
+
2008-10-20 Dan Williams <dcbw@redhat.com>
* src/nm-manager.c
if (!singleton)
singleton = nm_dhcp_manager_new ();
- g_object_ref (singleton);
+ else
+ g_object_ref (singleton);
+ g_assert (singleton);
return singleton;
}
g_free (device->pid_file);
g_free (device->lease_file);
g_free (device->iface);
+
g_slice_free (NMDHCPDevice, device);
}
if (device->pid_file) {
remove (device->pid_file);
g_free (device->pid_file);
+ device->pid_file = NULL;
}
/* Clean up the leasefile if it got left around */
if (device->lease_file) {
remove (device->lease_file);
g_free (device->lease_file);
+ device->lease_file = NULL;
}
/* Clean up config file if it got left around */
if (device->conf_file) {
remove (device->conf_file);
g_free (device->conf_file);
+ device->conf_file = NULL;
}
nm_dhcp_device_watch_cleanup (device);