lldp_create() malloc memory for lldp->lldpd->g_hardware. lldp_unref is supposed to free the memory, but it doesn't.
Signed-off-by: lic121 <lic...@chinatelecom.cn> --- lib/lldp/lldpd.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/lldp/lldpd.c b/lib/lldp/lldpd.c index a024dc5..ee1051d 100644 --- a/lib/lldp/lldpd.c +++ b/lib/lldp/lldpd.c @@ -140,13 +140,9 @@ lldpd_cleanup(struct lldpd *cfg) VLOG_DBG("cleanup all ports"); LIST_FOR_EACH_SAFE (hw, hw_next, h_entries, &cfg->g_hardware) { - if (!hw->h_flags) { - ovs_list_remove(&hw->h_entries); - lldpd_remote_cleanup(hw, NULL, true); - lldpd_hardware_cleanup(cfg, hw); - } else { - lldpd_remote_cleanup(hw, NULL, false); - } + ovs_list_remove(&hw->h_entries); + lldpd_remote_cleanup(hw, NULL, true); + lldpd_hardware_cleanup(cfg, hw); } VLOG_DBG("cleanup all chassis"); -- 1.8.3.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev