Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."


Today's Topics:

   1. Re: [PATCH] tethering: fix use after free. (Daniel Wagner)
   2. Re: [PATCH] tethering: fix use after free. (Mickael GARDET)


----------------------------------------------------------------------

Message: 1
Date: Thu, 22 Aug 2019 09:02:03 +0200
From: Daniel Wagner <[email protected]>
To: Mickael GARDET <[email protected]>
Cc: "[email protected] >> [email protected]"
        <[email protected]>
Subject: Re: [PATCH] tethering: fix use after free.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed

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


------------------------------

Message: 2
Date: Thu, 22 Aug 2019 11:09:49 +0200
From: Mickael GARDET <[email protected]>
To: Daniel Wagner <[email protected]>
Cc: "[email protected] >> [email protected]"
        <[email protected]>
Subject: Re: [PATCH] tethering: fix use after free.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

Hi Daniel,

Le 22/08/2019 ? 09:02, Daniel Wagner a ?crit?:
> 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?
Yes is not useful. (used for debug)
>
> Thanks,
> Daniel
Mickael



------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 46, Issue 22
***************************************

Reply via email to