From 0686aea14d903fa73b01117adacba30f273ca4c4 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Fri, 20 Jul 2012 14:45:16 -0700 Subject: [PATCH] Bug 679654: Crash for PangoContext.list_families Add transfer container annotations so that the array is freed but not the (static) family objects. --- pango/pango-context.c | 2 +- pango/pango-fontmap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pango/pango-context.c b/pango/pango-context.c index af0ccfa..a909cd0 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -243,7 +243,7 @@ pango_context_get_font_map (PangoContext *context) /** * pango_context_list_families: * @context: a #PangoContext - * @families: (out) (array length=n_families): location to store a pointer to + * @families: (out) (array length=n_families) (transfer container): location to store a pointer to * an array of #PangoFontFamily *. This array should be freed * with g_free(). * @n_families: (out): location to store the number of elements in @descs diff --git a/pango/pango-fontmap.c b/pango/pango-fontmap.c index ea6bb57..aaea09e 100644 --- a/pango/pango-fontmap.c +++ b/pango/pango-fontmap.c @@ -98,7 +98,7 @@ pango_font_map_load_font (PangoFontMap *fontmap, /** * pango_font_map_list_families: * @fontmap: a #PangoFontMap - * @families: (out) (array length=n_families): location to store a pointer to an array of #PangoFontFamily *. + * @families: (out) (array length=n_families) (transfer container): location to store a pointer to an array of #PangoFontFamily *. * This array should be freed with g_free(). * @n_families: (out): location to store the number of elements in @families * -- 2.7.4