]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
lldpd: cleanup default local port on exit
authorVincent Bernat <vincent@bernat.im>
Fri, 1 Jan 2016 17:20:29 +0000 (18:20 +0100)
committerVincent Bernat <vincent@bernat.im>
Fri, 1 Jan 2016 18:11:15 +0000 (19:11 +0100)
Easier to spot a leak with valgrind this way.

src/daemon/lldpd.c

index 22de4f08bc16cadd114c0680f6e65acc68756a05..86d822d19b6466d7632ba88c1e37306f16e96b13 100644 (file)
@@ -1218,6 +1218,8 @@ lldpd_exit(struct lldpd *cfg)
                lldpd_remote_cleanup(hardware, NULL, 1);
                lldpd_hardware_cleanup(cfg, hardware);
        }
+       lldpd_port_cleanup(cfg->g_default_local_port, 1);
+       free(cfg->g_default_local_port);
        interfaces_cleanup(cfg);
 
        free(cfg->g_config.c_platform);