Hi Mickael,
On 8/21/19 3:32 PM, Mickael GARDET wrote:
@@ -637,8 +637,8 @@ void __connman_tethering_client_register(const
char
*addr)
void __connman_tethering_client_unregister(const char *addr)
{
- g_hash_table_remove(clients_table, addr);
client_removed(addr);
+ g_hash_table_remove(clients_table, addr);
}
Okay, this one is clear why we should first call client_removed() bevore
g_hash_table_remove().
int __connman_tethering_init(void)
@@ -682,6 +682,7 @@ void __connman_tethering_cleanup(void)
g_hash_table_destroy(pn_hash);
g_hash_table_destroy(clients_notify->remove);
+ clients_notify->remove = NULL;
g_free(clients_notify);
clients_notify = NULL;
But I don't understand why this here is needed? We free clients_notify
and set it to NULL. So nothing can access it afterwards. Do I miss
something?
Thanks,
Daniel