diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2019-08-09 11:09:27 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2019-08-09 11:18:39 +0200 |
| commit | 820498b2158e0b05421ce0922f203a0699927fa8 (patch) | |
| tree | 3bf6d1089b762535ec5e59738d47ae2d2f54750f /libnm/nm-device.c | |
| parent | 1bd9f376796563dfb5016bada66c78b203f41d33 (diff) | |
| parent | 488dda3930545969f5644b57cfca81e21df031c3 (diff) | |
Merge remote-tracking branch 'salsa/master'
Diffstat (limited to 'libnm/nm-device.c')
| -rw-r--r-- | libnm/nm-device.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libnm/nm-device.c b/libnm/nm-device.c index aba4e5c4..b9f4acd4 100644 --- a/libnm/nm-device.c +++ b/libnm/nm-device.c @@ -1,4 +1,3 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1841,14 +1840,15 @@ nm_device_disambiguate_names (NMDevice **devices, for (i = 0; i < num_devices; i++) { if (duplicates[i] && NM_IS_DEVICE_BT (devices[i])) { const char *devname = nm_device_bt_get_name (NM_DEVICE_BT (devices[i])); + char *name; if (!devname) continue; g_free (names[i]); - names[i] = g_strdup_printf ("%s (%s)", - get_device_type_name_with_iface (devices[i]), - devname); + name = get_device_type_name_with_iface (devices[i]); + names[i] = g_strdup_printf ("%s (%s)", name, devname); + g_free (name); } } if (!find_duplicates (names, duplicates, num_devices)) |