summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-12-31 16:04:55 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2014-12-31 16:04:55 +0100
commite7a2419a2ae2a8f56a3e2840f8d623d2a449277a (patch)
tree2279041e63fd0245b4f5afe6cbd132cffeaa9083 /src
parentc5285fbfcede2e0f54d2b5f14193041067cd2af6 (diff)
lldp: fix uninitialized cleanup var
Make sure to set _cleanup_ variables to NULL. Otherwise, we free uninitialized objects.
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-network/lldp-internal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-network/lldp-internal.c b/src/libsystemd-network/lldp-internal.c
index f86c11e6ca..d03445b1e2 100644
--- a/src/libsystemd-network/lldp-internal.c
+++ b/src/libsystemd-network/lldp-internal.c
@@ -443,7 +443,7 @@ void lldp_neighbour_port_free(lldp_neighbour_port *p) {
int lldp_neighbour_port_new(lldp_chassis *c,
tlv_packet *tlv,
lldp_neighbour_port **ret) {
- _cleanup_lldp_neighbour_port_free_ lldp_neighbour_port *p;
+ _cleanup_lldp_neighbour_port_free_ lldp_neighbour_port *p = NULL;
uint16_t length, ttl;
uint8_t *data;
uint8_t type;