Fix a couple of leaks.

2005-07-21  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.c (update_pango_context): Fix a couple of leaks.
This commit is contained in:
Owen Taylor 2005-07-21 23:37:19 +00:00 committed by Owen Taylor
parent d11d5f88fb
commit 49e9aef502
4 changed files with 20 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2005-07-21 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (update_pango_context): Fix a couple of leaks.
2005-07-21 Christian Rose <menthos@menthos.com> 2005-07-21 Christian Rose <menthos@menthos.com>
* configure.in: Added "hy" to ALL_LINGUAS. * configure.in: Added "hy" to ALL_LINGUAS.

View File

@ -1,3 +1,7 @@
2005-07-21 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (update_pango_context): Fix a couple of leaks.
2005-07-21 Christian Rose <menthos@menthos.com> 2005-07-21 Christian Rose <menthos@menthos.com>
* configure.in: Added "hy" to ALL_LINGUAS. * configure.in: Added "hy" to ALL_LINGUAS.

View File

@ -1,3 +1,7 @@
2005-07-21 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (update_pango_context): Fix a couple of leaks.
2005-07-21 Christian Rose <menthos@menthos.com> 2005-07-21 Christian Rose <menthos@menthos.com>
* configure.in: Added "hy" to ALL_LINGUAS. * configure.in: Added "hy" to ALL_LINGUAS.

View File

@ -5200,13 +5200,13 @@ update_pango_context (GtkWidget *widget,
#ifdef GDK_WINDOWING_X11 #ifdef GDK_WINDOWING_X11
GtkSettings *settings; GtkSettings *settings;
gint hinting; gint hinting;
char *hint_style_str; gchar *hint_style_str;
cairo_hint_style_t hint_style = CAIRO_HINT_STYLE_DEFAULT; cairo_hint_style_t hint_style = CAIRO_HINT_STYLE_DEFAULT;
gint antialias; gint antialias;
cairo_antialias_t antialias_mode = CAIRO_ANTIALIAS_DEFAULT; cairo_antialias_t antialias_mode = CAIRO_ANTIALIAS_DEFAULT;
char *rgba_str; gchar *rgba_str;
cairo_subpixel_order_t subpixel_order = CAIRO_SUBPIXEL_ORDER_DEFAULT; cairo_subpixel_order_t subpixel_order = CAIRO_SUBPIXEL_ORDER_DEFAULT;
int dpi; gint dpi;
cairo_font_options_t *options; cairo_font_options_t *options;
#endif #endif
@ -5248,6 +5248,9 @@ update_pango_context (GtkWidget *widget,
hint_style = CAIRO_HINT_STYLE_FULL; hint_style = CAIRO_HINT_STYLE_FULL;
} }
if (hint_style_str)
g_free (hint_style_str);
cairo_font_options_set_hint_style (options, hint_style); cairo_font_options_set_hint_style (options, hint_style);
if (rgba_str) if (rgba_str)
@ -5260,6 +5263,8 @@ update_pango_context (GtkWidget *widget,
subpixel_order = CAIRO_SUBPIXEL_ORDER_VRGB; subpixel_order = CAIRO_SUBPIXEL_ORDER_VRGB;
else if (strcmp (rgba_str, "vbgr") == 0) else if (strcmp (rgba_str, "vbgr") == 0)
subpixel_order = CAIRO_SUBPIXEL_ORDER_VBGR; subpixel_order = CAIRO_SUBPIXEL_ORDER_VBGR;
g_free (rgba_str);
} }
cairo_font_options_set_subpixel_order (options, subpixel_order); cairo_font_options_set_subpixel_order (options, subpixel_order);