summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2004-06-21 15:43:25 +0000
committerOwen Taylor <otaylor@src.gnome.org>2004-06-21 15:43:25 +0000
commit95059cad33f0ae575af5b8e79c0fddd021c99834 (patch)
tree025c4c4459ec77af9384d60814402e0dc1a83124 /pango/pango-attributes.c
parent3d2ba1dd99788c556c9d24ca0a310dd896266e01 (diff)
downloadpango-95059cad33f0ae575af5b8e79c0fddd021c99834.tar.gz
Fix leak when inserting an empty attributes. (#140771, Morten Welinder)
Mon Jun 21 11:41:18 2004 Owen Taylor <otaylor@redhat.com> * pango/pango-attributes.c (pango_attr_list_change): Fix leak when inserting an empty attributes. (#140771, Morten Welinder)
Diffstat (limited to 'pango/pango-attributes.c')
-rw-r--r--pango/pango-attributes.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index 57017cb8..a8801948 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -972,7 +972,10 @@ pango_attr_list_change (PangoAttrList *list,
g_return_if_fail (list != NULL);
if (start_index == end_index) /* empty, nothing to do */
- return;
+ {
+ pango_attribute_destroy (attr);
+ return;
+ }
tmp_list = list->attributes;
prev = NULL;