summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2008-10-06 16:09:54 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2008-10-06 16:09:54 +0000
commit193dc341dd29635621e3b8935c6524b3d59c73fa (patch)
tree41369513e4801f8846d68e6ce76f6fe6febb0f8c
parent9fc142f430bcc33bacda47f91bf9dd3e7d142701 (diff)
downloadpango-193dc341dd29635621e3b8935c6524b3d59c73fa.tar.gz
Bug 555219 – Memory leak when using pango_layout_iter_copy Patch from
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
-rw-r--r--ChangeLog8
-rw-r--r--pango/pango-layout.c3
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index cb303216..1ba88710 100644
--- 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):
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 0d2f6a7b..6be30bd1 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -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;
}