mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-23 19:24:38 +00:00
2008-03-14 Tambet Ingo <tambet@gmail.com>
* src/nm-manager.c - (nm_device_interface_get_iface): g_object_get() will return an allocated value, so this function must not return const - (nm_device_interface_activate): free returned iface git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3464 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
d26d505f81
commit
4c9845b646
|
@ -1,3 +1,10 @@
|
|||
2008-03-14 Tambet Ingo <tambet@gmail.com>
|
||||
|
||||
* src/nm-manager.c
|
||||
- (nm_device_interface_get_iface): g_object_get() will return an
|
||||
allocated value, so this function must not return const
|
||||
- (nm_device_interface_activate): free returned iface
|
||||
|
||||
2008-03-14 Tambet Ingo <tambet@gmail.com>
|
||||
|
||||
* src/NetworkManagerPolicy.c (auto_activate_device): Don't leak device and
|
||||
|
|
|
@ -164,10 +164,10 @@ nm_device_interface_get_type (void)
|
|||
}
|
||||
|
||||
/* FIXME: This should be public and nm_device_get_iface() should be removed. */
|
||||
static const char *
|
||||
static char *
|
||||
nm_device_interface_get_iface (NMDeviceInterface *device)
|
||||
{
|
||||
const char *iface = NULL;
|
||||
char *iface = NULL;
|
||||
|
||||
g_return_val_if_fail (NM_IS_DEVICE_INTERFACE (device), NULL);
|
||||
|
||||
|
@ -199,6 +199,7 @@ nm_device_interface_activate (NMDeviceInterface *device,
|
|||
gboolean success;
|
||||
NMConnection *connection;
|
||||
NMSettingConnection *s_con;
|
||||
char *iface;
|
||||
|
||||
g_return_val_if_fail (NM_IS_DEVICE_INTERFACE (device), FALSE);
|
||||
g_return_val_if_fail (NM_IS_ACT_REQUEST (req), FALSE);
|
||||
|
@ -208,7 +209,10 @@ nm_device_interface_activate (NMDeviceInterface *device,
|
|||
s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
|
||||
g_assert (s_con);
|
||||
|
||||
nm_info ("Activation (%s) starting connection '%s'", nm_device_interface_get_iface (device), s_con->id);
|
||||
iface = nm_device_interface_get_iface (device);
|
||||
nm_info ("Activation (%s) starting connection '%s'", iface, s_con->id);
|
||||
g_free (iface);
|
||||
|
||||
success = NM_DEVICE_INTERFACE_GET_INTERFACE (device)->activate (device, req, error);
|
||||
if (!success)
|
||||
g_assert (*error);
|
||||
|
|
Loading…
Reference in a new issue