mirror of
https://github.com/systemd/systemd.git
synced 2025-01-12 13:18:14 +03:00
lldp: fix double free
'k' is marked as _cleanup_free_ so reset it to NULL if we free it explicitly.
This commit is contained in:
parent
fbee1d8587
commit
580e55da11
@ -484,6 +484,7 @@ int sd_lldp_save(sd_lldp *lldp, const char *lldp_file) {
|
|||||||
t = strappend(s, buf);
|
t = strappend(s, buf);
|
||||||
|
|
||||||
free(k);
|
free(k);
|
||||||
|
k = NULL;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
mac = port_id;
|
mac = port_id;
|
||||||
|
Loading…
Reference in New Issue
Block a user