projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5285fb
)
lldp: fix uninitialized cleanup var
author
David Herrmann
<dh.herrmann@gmail.com>
Wed, 31 Dec 2014 15:04:55 +0000
(16:04 +0100)
committer
David Herrmann
<dh.herrmann@gmail.com>
Wed, 31 Dec 2014 15:04:55 +0000
(16:04 +0100)
Make sure to set _cleanup_ variables to NULL. Otherwise, we free
uninitialized objects.
src/libsystemd-network/lldp-internal.c
patch
|
blob
|
history
diff --git
a/src/libsystemd-network/lldp-internal.c
b/src/libsystemd-network/lldp-internal.c
index
f86c11e
..
d03445b
100644
(file)
--- 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;