Bug 679654: Crash for PangoContext.list_families
authorJohn Ralls <jralls@ceridwen.us>
Fri, 20 Jul 2012 21:45:16 +0000 (14:45 -0700)
committerJohn Ralls <jralls@ceridwen.us>
Fri, 20 Jul 2012 21:45:16 +0000 (14:45 -0700)
Add transfer container annotations so that the array is freed but not
the (static) family objects.

pango/pango-context.c
pango/pango-fontmap.c

index af0ccfa..a909cd0 100644 (file)
@@ -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
index ea6bb57..aaea09e 100644 (file)
@@ -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
  *