summaryrefslogtreecommitdiff
path: root/src/libsystemd-network
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-12-31 15:58:27 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2014-12-31 15:58:27 +0100
commit580e55da1118870b6099d1a863d9806a31f2b1b4 (patch)
treeecfbbf25e826656bcfab114ddab6824414adaf2c /src/libsystemd-network
parentfbee1d8587458922dec3fd8a9e0f663313697029 (diff)
lldp: fix double free
'k' is marked as _cleanup_free_ so reset it to NULL if we free it explicitly.
Diffstat (limited to 'src/libsystemd-network')
-rw-r--r--src/libsystemd-network/sd-lldp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-lldp.c b/src/libsystemd-network/sd-lldp.c
index 08cd092213..74ea810c82 100644
--- a/src/libsystemd-network/sd-lldp.c
+++ b/src/libsystemd-network/sd-lldp.c
@@ -484,6 +484,7 @@ int sd_lldp_save(sd_lldp *lldp, const char *lldp_file) {
t = strappend(s, buf);
free(k);
+ k = NULL;
} else {
mac = port_id;