From bc66e31834419c12770d790694bc9e60eccd11e2 Mon Sep 17 00:00:00 2001 From: Paul Warren Date: Tue, 3 Jan 2017 21:53:09 +0000 Subject: Clean up libpcap on exit - Brian Russell On exit, call pcap_close() so that any resources used internally by libpcap can be cleaned up. http://lists.beasts.org/pipermail/iftop-users/2016-September/000455.html --- iftop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/iftop.c b/iftop.c index a090dcf..f9875c9 100644 --- a/iftop.c +++ b/iftop.c @@ -839,6 +839,8 @@ int main(int argc, char **argv) { } pthread_cancel(thread); + pthread_join(thread, NULL); + pcap_close(pd); ui_finish(); -- cgit v1.2.3