diff options
author | Thomas Haller <thaller@redhat.com> | 2014-07-26 02:30:22 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-08-01 19:06:24 +0200 |
commit | 8720c8e13684037285b4908a44b88d68572c6819 (patch) | |
tree | 3ebfd49a08d4b16eed309f8b67c8151149390936 /src | |
parent | bd37e0ea58f460aaff0ee83deb047f87888c9d84 (diff) | |
download | NetworkManager-8720c8e13684037285b4908a44b88d68572c6819.tar.gz |
core: no need to clone ifname in nm_device_generate_connection()
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/nm-device.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 2d1ac7e3e2..267cb7b20c 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -1717,7 +1717,6 @@ nm_device_generate_connection (NMDevice *device, NMDevice *master) NMSetting *s_ip4; NMSetting *s_ip6; gs_free char *uuid = NULL; - gs_free char *name = NULL; const char *ip4_method, *ip6_method; GError *error = NULL; @@ -1734,11 +1733,10 @@ nm_device_generate_connection (NMDevice *device, NMDevice *master) connection = nm_connection_new (); s_con = nm_setting_connection_new (); uuid = nm_utils_uuid_generate (); - name = g_strdup_printf ("%s", ifname); g_object_set (s_con, NM_SETTING_CONNECTION_UUID, uuid, - NM_SETTING_CONNECTION_ID, name, + NM_SETTING_CONNECTION_ID, ifname, NM_SETTING_CONNECTION_AUTOCONNECT, FALSE, NM_SETTING_CONNECTION_INTERFACE_NAME, ifname, NM_SETTING_CONNECTION_TIMESTAMP, (guint64) time (NULL), |