diff options
author | Matias De lellis <[email protected]> | 2014-12-14 13:44:34 -0300 |
---|---|---|
committer | infirit <[email protected]> | 2014-12-15 15:01:56 +0100 |
commit | 9ae0be5ccf7df2f35c13653da97771b06cf6603f (patch) | |
tree | 5d9c87a4c225a067a887d90f001d163dc7d934a8 /src/procman.cpp | |
parent | cdd64eb85839577b63a5dc8840cdb339d5b78abd (diff) | |
download | mate-system-monitor-9ae0be5ccf7df2f35c13653da97771b06cf6603f.tar.bz2 mate-system-monitor-9ae0be5ccf7df2f35c13653da97771b06cf6603f.tar.xz |
Fix a few of mem leaks. [Backported from old gnome-system-monitor]
Diffstat (limited to 'src/procman.cpp')
-rw-r--r-- | src/procman.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/procman.cpp b/src/procman.cpp index c21e61f..180b0d4 100644 --- a/src/procman.cpp +++ b/src/procman.cpp @@ -189,7 +189,7 @@ static void color_changed_cb (GSettings *settings, const gchar *key, gpointer data) { ProcData * const procdata = static_cast<ProcData*>(data); - const gchar *color = g_settings_get_string (settings, key); + gchar *color = g_settings_get_string (settings, key); if (g_str_has_prefix (key, "cpu-color")) { for (int i = 0; i < procdata->config.num_cpus; i++) { @@ -220,6 +220,7 @@ color_changed_cb (GSettings *settings, const gchar *key, gpointer data) else { g_assert_not_reached(); } + g_free (color); } @@ -450,6 +451,7 @@ procman_get_tree_state (GSettings *settings, GtkWidget *tree, const gchar *child proctable_set_columns_order(GTK_TREE_VIEW(tree), order); + g_variant_unref(value); g_slist_free(order); } |