summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-02-28 14:17:15 +0100
committerThomas Haller <thaller@redhat.com>2016-02-29 14:23:22 +0100
commitc130a3b39a1753294ec6e4da5e254fb389cd6577 (patch)
tree24932a51ebe864418e5b02d169b64d44827c028c
parent2a466216e1c1ed7f8f8b0df3b86f55ac2eb198a3 (diff)
downloadNetworkManager-c130a3b39a1753294ec6e4da5e254fb389cd6577.tar.gz
lldp: don't mix malloc() with g_malloc()
-rw-r--r--src/devices/nm-lldp-listener.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/nm-lldp-listener.c b/src/devices/nm-lldp-listener.c
index fa77cc74ec..f57a3068f9 100644
--- a/src/devices/nm-lldp-listener.c
+++ b/src/devices/nm-lldp-listener.c
@@ -307,7 +307,7 @@ process_lldp_neighbors (NMLldpListener *self)
case LLDP_CHASSIS_SUBTYPE_INTERFACE_NAME:
case LLDP_CHASSIS_SUBTYPE_LOCALLY_ASSIGNED:
case LLDP_CHASSIS_SUBTYPE_CHASSIS_COMPONENT:
- neigh->chassis_id = strndup ((char *) chassis_id, chassis_id_len);
+ neigh->chassis_id = g_strndup ((const char *) chassis_id, chassis_id_len);
break;
case LLDP_CHASSIS_SUBTYPE_MAC_ADDRESS:
neigh->chassis_id = nm_utils_hwaddr_ntoa (chassis_id, chassis_id_len);