mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-07 06:03:51 +00:00
lldp: fix uninitialized cleanup var
Make sure to set _cleanup_ variables to NULL. Otherwise, we free uninitialized objects.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user