Re: [PATCH BlueZ 01/10] gdbus: Fix not freeing list node by using g_slist_delete_link

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

 



On Mon, Oct 1, 2012 at 2:53 PM, Luiz Augusto von Dentz
<luiz.dentz@xxxxxxxxx> wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
>
> g_slist_remove_link does not free the node which can cause leaks so
> replace that with g_slist_delete_link which does free memory properly.
> ---
>  gdbus/watch.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gdbus/watch.c b/gdbus/watch.c
> index a402ca9..07feb61 100644
> --- a/gdbus/watch.c
> +++ b/gdbus/watch.c
> @@ -574,7 +574,7 @@ static DBusHandlerResult message_filter(DBusConnection *connection,
>                         continue;
>
>                 remove_match(data);
> -               listeners = g_slist_remove_link(listeners, l);
> +               listeners = g_slist_delete_link(listeners, l);
>
>                 filter_data_free(data);
>         }
> --

Ack,

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