Hi, As Marcel pointed out, we might face memory leak when using g_hash_table_insert() wrongly (i.e.: not checking wether key is already there or not, moreover if such key, and/or relatede value, is a memory duplication.
I did a quick check on connman's code, and found 5 places where it might be more relevant to use replace instead of insert (all other "insert" findings were used after a lookup and so on, so no risk there). This replace instead of insert should not harm, but please review. Tomasz Bursztyka (5): bluetooth: use g_hash_table_replace instead of insert function vpn: use g_hash_table_replace instead of insert function task: use g_hash_table_replace instead of insert function nat: use g_hash_table_replace instead of insert function device: use g_hash_table_replace instead of insert function plugins/bluetooth.c | 2 +- plugins/vpn.c | 2 +- src/device.c | 2 +- src/nat.c | 2 +- src/task.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) -- 1.7.8.5 _______________________________________________ connman mailing list [email protected] http://lists.connman.net/listinfo/connman
