Skip to content
Permalink
Browse files

pluma-view: Fix possible memory leak

  • Loading branch information...
sc0w authored and raveit65 committed Jul 24, 2018
1 parent d3757df commit 06d6e5df6e6631c81ae4d61414108435f0707688
Showing with 7 additions and 4 deletions.
  1. +7 −4 pluma/pluma-view.c
@@ -675,7 +675,7 @@ contextmenu_font_changed_cb (GSettings *settings,
sys_font_desc = get_system_font ();
if (sys_font_desc)
{
pluma_override_font (".context-menu", GTK_WIDGET (user_data), sys_font_desc);
pluma_override_font (".context-menu", NULL, sys_font_desc);
pango_font_description_free (sys_font_desc);
}
}
@@ -718,10 +718,13 @@ pluma_override_font (const gchar *item,
{
if (strstr (prov_str, ".context-menu"))
{
prov_str = g_strdelimit (prov_str, "}", '\0');
prov_str = g_strdup_printf ("%s}", prov_str);
g_strdelimit (prov_str, "}", '\0');
gchar *prov_new_str = g_strdup_printf ("%s}", prov_str);
css = g_strdup_printf ("%s %s { %s %s %s %s }", prov_new_str, item, family, weight, style, size);
g_free (prov_new_str);
}
css = g_strdup_printf ("%s %s { %s %s %s %s }", prov_str, item, family, weight, style, size);
else
css = g_strdup_printf ("%s %s { %s %s %s %s }", prov_str, item, family, weight, style, size);
}
else
css = g_strdup_printf ("%s { %s %s %s %s }", item, family, weight, style, size);

0 comments on commit 06d6e5d

Please sign in to comment.
You can’t perform that action at this time.