Bug 555219 – Memory leak when using pango_layout_iter_copy Patch from
authorBehdad Esfahbod <behdad@gnome.org>
Mon, 6 Oct 2008 16:09:54 +0000 (16:09 +0000)
committerBehdad Esfahbod <behdad@src.gnome.org>
Mon, 6 Oct 2008 16:09:54 +0000 (16:09 +0000)
2008-10-06  Behdad Esfahbod  <behdad@gnome.org>

        Bug 555219 – Memory leak when using pango_layout_iter_copy
        Patch from Falk Rohsiepe

        * pango/pango-layout.c (pango_layout_iter_copy):  Use gslice, not
        memdup.  Oops!

svn path=/trunk/; revision=2726

ChangeLog
pango/pango-layout.c

index cb30321..1ba8871 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-10-06  Behdad Esfahbod  <behdad@gnome.org>
+
+       Bug 555219 – Memory leak when using pango_layout_iter_copy
+       Patch from Falk Rohsiepe
+
+       * pango/pango-layout.c (pango_layout_iter_copy):  Use gslice, not
+       memdup.  Oops!
+
 2008-09-29  Behdad Esfahbod  <behdad@gnome.org>
 
        * pango/opentype/harfbuzz-gpos.c (Position_CursiveChain):
index 0d2f6a7..6be30bd 100644 (file)
@@ -5445,8 +5445,7 @@ pango_layout_iter_copy (PangoLayoutIter *iter)
   for (l = iter->line_extents; l; l = l->next)
     {
       new->line_extents = g_slist_prepend (new->line_extents,
-                                          g_memdup (l->data,
-                                                    sizeof (Extents)));
+                              g_slice_dup (Extents, l->data));
       if (l == iter->line_extents_link)
        new->line_extents_link = new->line_extents;
     }