Re: [PATCH BlueZ] core: Fix walking the list while removing elements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 4, 2012 at 2:16 PM, Bastien Nocera <hadess@xxxxxxxxxx> wrote:
> On Thu, 2012-10-04 at 14:07 -0300, Lucas De Marchi wrote:
>> -       for (l = device->profiles; l != NULL; l = g_slist_next(l)) {
>> +       for (l = device->profiles; l != NULL; l = next) {
>
> +       for (l = device->profiles; l != NULL; l = l->next) {

nops. you can't access "l" if it was deleted from the list

>
>>                 struct btd_profile *profile = l->data;
>>                 GSList *probe_uuids;
>>
>> +               next = l->next;
>
> Remove.

nops.


See previous patch.



Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux