Skip to content
Permalink
Browse files

pluma-window: Fix memory leaks

'g_strconcat' needs to be freed
  • Loading branch information...
sc0w committed Dec 5, 2018
1 parent 4e1d4d6 commit e8cbd69cc430cb184d20f34c8a26bac294fa946b
Showing with 10 additions and 2 deletions.
  1. +10 −2 pluma/pluma-window.c
@@ -328,15 +328,23 @@ pluma_window_key_press_event (GtkWidget *widget,
sprintf (tempsize, "%d", nsize);

if (!g_settings_get_boolean (settings, "use-default-font") && (nsize < 73))
g_settings_set_string (settings, "editor-font", g_strconcat (tempfont, tempsize, NULL));
{
gchar *tmp = g_strconcat (tempfont, tempsize, NULL);
g_settings_set_string (settings, "editor-font", tmp);
g_free (tmp);
}
}
else if ((event->keyval == GDK_KEY_minus) || (event->keyval == GDK_KEY_KP_Subtract))
{
nsize = nsize - 1;
sprintf (tempsize, "%d", nsize);

if (!g_settings_get_boolean (settings, "use-default-font") && (nsize > 5))
g_settings_set_string (settings, "editor-font", g_strconcat (tempfont, tempsize, NULL));
{
gchar *tmp = g_strconcat (tempfont, tempsize, NULL);
g_settings_set_string (settings, "editor-font", tmp);
g_free (tmp);
}
}

if (g_settings_get_boolean (settings, "ctrl-tab-switch-tabs"))

0 comments on commit e8cbd69

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