[lttng-dev] [PATCH babeltrace v3] Do not use g_list_free_full

Jérémie Galarneau jeremie.galarneau at efficios.com
Tue Jan 5 16:16:32 EST 2016


Merged in master, thanks!

Jérémie

On Mon, Jan 4, 2016 at 5:04 PM, Jonathan Rajotte
<jonathan.rajotte-julien at efficios.com> wrote:
> v3: we support from 2.22 not 2.28.
> --
>
> Babeltrace support glib all the way back to 2.22 and g_list_free_full
> exists from 2.28.0 (backported to 2.27.2) only.
>
> The replacement is the current implementation found in modern glib.
>
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
> ---
>  formats/ctf/ir/visitor.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/formats/ctf/ir/visitor.c b/formats/ctf/ir/visitor.c
> index 9b65ed5..704a804 100644
> --- a/formats/ctf/ir/visitor.c
> +++ b/formats/ctf/ir/visitor.c
> @@ -724,7 +724,8 @@ end:
>                 g_free(name_copy);
>         }
>         if (path_tokens) {
> -               g_list_free_full(path_tokens, free);
> +               g_list_foreach(path_tokens, (GFunc) free, NULL);
> +               g_list_free(path_tokens);
>         }
>         return ret;
>  error:
> --
> 2.5.0
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list