aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/e-menu-tool-button.c7
-rw-r--r--widgets/text/e-text.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/widgets/misc/e-menu-tool-button.c b/widgets/misc/e-menu-tool-button.c
index 7ca38bc1e9..612ed801f2 100644
--- a/widgets/misc/e-menu-tool-button.c
+++ b/widgets/misc/e-menu-tool-button.c
@@ -47,6 +47,7 @@ static GtkMenuItem *
menu_tool_button_get_first_menu_item (GtkMenuToolButton *menu_tool_button)
{
GtkWidget *menu;
+ GtkMenuItem *item;
GList *children;
menu = gtk_menu_tool_button_get_menu (menu_tool_button);
@@ -57,7 +58,11 @@ menu_tool_button_get_first_menu_item (GtkMenuToolButton *menu_tool_button)
if (children == NULL)
return NULL;
- return GTK_MENU_ITEM (children->data);
+ item = GTK_MENU_ITEM (children->data);
+
+ g_list_free (children);
+
+ return item;
}
static void
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 0383b00597..bb9b2dda51 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -429,6 +429,9 @@ reset_layout (EText *text)
cairo_font_options_destroy (font_options);
pango_layout_context_changed (text->layout);
+ if (text->font_desc) {
+ pango_font_description_free (text->font_desc);
+ }
text->font_desc = pango_font_description_new ();
if (!pango_font_description_get_size_is_absolute (style->font_desc))
pango_font_description_set_size (text->font_desc,