From 95059cad33f0ae575af5b8e79c0fddd021c99834 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Mon, 21 Jun 2004 15:43:25 +0000 Subject: Fix leak when inserting an empty attributes. (#140771, Morten Welinder) Mon Jun 21 11:41:18 2004 Owen Taylor * pango/pango-attributes.c (pango_attr_list_change): Fix leak when inserting an empty attributes. (#140771, Morten Welinder) --- pango/pango-attributes.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pango/pango-attributes.c') 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; -- cgit v1.2.1