From cc9fc8de676e7855be63c69ce6fcf7483ffcd164 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Sun, 19 Aug 2018 22:05:31 -0500 Subject: [PATCH] knownnetworks: Fix leak of fswatch ==7330== 112 bytes in 1 blocks are still reachable in loss record 1 of 1 ==7330== at 0x4C2CF8F: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==7330== by 0x14CF7D: l_malloc (util.c:62) ==7330== by 0x152A25: l_io_new (io.c:172) ==7330== by 0x16B217: l_fswatch_init (fswatch.c:171) ==7330== by 0x16B217: l_fswatch_new (fswatch.c:198) ==7330== by 0x13B9D9: known_networks_init (knownnetworks.c:401) ==7330== by 0x110020: main (main.c:439) --- src/knownnetworks.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/knownnetworks.c b/src/knownnetworks.c index b47ebb3e..b3916242 100644 --- a/src/knownnetworks.c +++ b/src/knownnetworks.c @@ -409,6 +409,8 @@ void known_networks_exit(void) { struct l_dbus *dbus = dbus_get_bus(); + l_fswatch_destroy(storage_dir_watch); + l_queue_destroy(known_networks, network_info_free); known_networks = NULL;