summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-11-06 22:29:28 -0500
committerMarco Trevisan (TreviƱo) <mail@3v1n0.net>2021-05-05 17:31:44 +0200
commit98af928b7dc65ed0bcd2680eaba43c32ef5f5b77 (patch)
treeb7230d5f93bd51130be696fcad29c1071330d516
parent99f4661a4f19802ba122fae09668a0b0e1cb7ca0 (diff)
downloadpango-98af928b7dc65ed0bcd2680eaba43c32ef5f5b77.tar.gz
tests: Don't free attributes prematurely
test-shape was using one of its attribute lists after dropping the reference on it. Don't do that. (cherry-picked from commit 17d8202d)
-rw-r--r--tests/test-shape.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-shape.c b/tests/test-shape.c
index c2488dbf..feca154e 100644
--- a/tests/test-shape.c
+++ b/tests/test-shape.c
@@ -185,8 +185,6 @@ test_file (const gchar *filename, GString *string)
pango_attr_list_unref (itemize_attrs);
pango_attr_list_unref (shape_attrs);
- pango_attr_list_unref (attrs);
-
for (l = items; l; l = l->next)
{
PangoItem *item = l->data;
@@ -281,6 +279,8 @@ test_file (const gchar *filename, GString *string)
g_list_free_full (items, (GDestroyNotify)pango_item_free);
g_free (contents);
g_free (text);
+
+ pango_attr_list_unref (attrs);
}
static gchar *