The memory leak shows up in valgrind like this:

==13796== 5,544 (1,848 direct, 3,696 indirect) bytes in 22 blocks are
definitely lost in loss record 219 of 222
==13796==    at 0x483933C: malloc (vg_replace_malloc.c:296)
==13796==    by 0x48B778F: g_try_malloc0 (gmem.c:280)
==13796==    by 0x25C0B: interface_network_added (supplicant.c:1157)
==13796==    by 0x260EF: interface_property (supplicant.c:1906)
==13796==    by 0x286FF: supplicant_dbus_property_foreach (dbus.c:145)
==13796==    by 0x2245F: g_supplicant_filter (supplicant.c:2636)
==13796==    by 0x497AF4F: dbus_connection_dispatch (in
/usr/lib/libdbus-1.so.3.7.12)
==13796==    by 0x8164F: message_dispatch (mainloop.c:72)
==13796==    by 0x48ABA8B: g_idle_dispatch (gmain.c:5251)
==13796==    by 0x48AFB1F: g_main_dispatch (gmain.c:3066)
==13796==    by 0x48AFB1F: g_main_context_dispatch (gmain.c:3642)
==13796==    by 0x48AFE23: g_main_context_iterate.part.19 (gmain.c:3713)
==13796==    by 0x48B048B: g_main_loop_run (gmain.c:3906)
==13796==    by 0x149D3: main (main.c:761)

I can make this leak go away by deleting a few hundred lines of code
from supplicant.c, specifically the following functions:

1. merge_network
2. network_property
3. interface_network_added
4. interface_network_removed
5. signal_network_added
6. signal_network_removed

No functionality seem to be affected. Additionally, it appears that
GSupplicantInterface::net_mapping table is quite useless. I couldn't
figure out how anything could possibly get into that table.

Am I missing something? Or should I submit a patch removing the above
mentioned stuff?

Regards,
-Slava
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to