chiark / gitweb /
lldp: fix sd_lldp_save()
authorDavid Herrmann <dh.herrmann@gmail.com>
Wed, 31 Dec 2014 15:28:48 +0000 (16:28 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Wed, 31 Dec 2014 15:28:48 +0000 (16:28 +0100)
commitee14ebf211df1322c3d8b550b931bbfa6cb3b033
tree43bedee2fa336e4b3f373205b14d2bb71fc41856
parent7d4866548d028489d84c39af1bb9206842a77b2b
lldp: fix sd_lldp_save()

Fix a bunch of needless memzero() calls, a bunch of use-after-free
regarding _cleanup_free_ and drop unused variables.

Hint: Do NOT use _cleanup_free_ for temporary strappend() helpers that are
freed multiple times. All you safe is the last free() call, which is
really not worth the trouble resetting it to NULL all the time.
src/libsystemd-network/sd-lldp.c