summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r--src/libsystemd-network/test-lldp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libsystemd-network/test-lldp.c b/src/libsystemd-network/test-lldp.c
index f81284e2a7..ee74ebd418 100644
--- a/src/libsystemd-network/test-lldp.c
+++ b/src/libsystemd-network/test-lldp.c
@@ -131,7 +131,8 @@ static int lldp_parse_chassis_tlv(tlv_packet *m, uint8_t *type) {
}
static int lldp_parse_port_id_tlv(tlv_packet *m) {
- char *str = NULL, *p;
+ _cleanup_free_ char *p = NULL;
+ char *str = NULL;
uint16_t length;
uint8_t subtype;
@@ -158,7 +159,8 @@ static int lldp_parse_port_id_tlv(tlv_packet *m) {
}
static int lldp_parse_system_name_tlv(tlv_packet *m) {
- char *str = NULL, *p;
+ _cleanup_free_ char *p = NULL;
+ char *str = NULL;
uint16_t length;
assert_se(lldp_tlv_packet_enter_container(m, LLDP_TYPE_SYSTEM_NAME) >= 0);
@@ -175,7 +177,8 @@ static int lldp_parse_system_name_tlv(tlv_packet *m) {
}
static int lldp_parse_system_desc_tlv(tlv_packet *m) {
- char *str = NULL, *p;
+ _cleanup_free_ char *p = NULL;
+ char *str = NULL;
uint16_t length;
assert_se(lldp_tlv_packet_enter_container(m, LLDP_TYPE_SYSTEM_DESCRIPTION) >= 0);