summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test-common.c12
-rw-r--r--tests/testboundaries_ucd.c1
2 files changed, 11 insertions, 2 deletions
diff --git a/tests/test-common.c b/tests/test-common.c
index 786973f1..60ecb7e1 100644
--- a/tests/test-common.c
+++ b/tests/test-common.c
@@ -125,14 +125,22 @@ print_attribute (PangoAttribute *attr, GString *string)
g_string_append_printf (string, "%d", ((PangoAttrInt *)attr)->value);
break;
case PANGO_ATTR_FONT_DESC:
- g_string_append_printf (string, "%s", pango_font_description_to_string (((PangoAttrFontDesc *)attr)->desc));
+ {
+ char *text = pango_font_description_to_string (((PangoAttrFontDesc *)attr)->desc);
+ g_string_append_printf (string, "%s", text);
+ g_free (text);
+ }
break;
case PANGO_ATTR_FOREGROUND:
case PANGO_ATTR_BACKGROUND:
case PANGO_ATTR_UNDERLINE_COLOR:
case PANGO_ATTR_OVERLINE_COLOR:
case PANGO_ATTR_STRIKETHROUGH_COLOR:
- g_string_append_printf (string, "%s", pango_color_to_string (&((PangoAttrColor *)attr)->color));
+ {
+ char *text = pango_color_to_string (&((PangoAttrColor *)attr)->color);
+ g_string_append_printf (string, "%s", text);
+ g_free (text);
+ }
break;
case PANGO_ATTR_SHAPE:
g_string_append_printf (string, "shape");
diff --git a/tests/testboundaries_ucd.c b/tests/testboundaries_ucd.c
index f77abdcd..18ab94cc 100644
--- a/tests/testboundaries_ucd.c
+++ b/tests/testboundaries_ucd.c
@@ -298,6 +298,7 @@ do_test (const gchar *filename,
}
g_free (string);
g_free (expected_attrs);
+ g_free (line);
i++;
}