From 8720c8e13684037285b4908a44b88d68572c6819 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sat, 26 Jul 2014 02:30:22 +0200 Subject: core: no need to clone ifname in nm_device_generate_connection() Signed-off-by: Thomas Haller --- src/devices/nm-device.c | 4 +--- 1 file changed, 1 insertion(+), 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), -- cgit v1.2.1