Commit 62163cb7 authored by Stefano Facchini's avatar Stefano Facchini

Plug memory leaks

parent 261fc3f6
......@@ -300,7 +300,7 @@ create_preferences_dialog (GsmApplication *app)
g_signal_connect (G_OBJECT (prefs_dialog), "response",
G_CALLBACK (prefs_dialog_button_pressed), app);
const char* current_tab = g_settings_get_string (app->settings, GSM_SETTING_CURRENT_TAB);
char *current_tab = g_settings_get_string (app->settings, GSM_SETTING_CURRENT_TAB);
if (strcmp (current_tab, "processes") == 0)
gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 0);
else if (strcmp (current_tab, "resources") == 0)
......@@ -308,6 +308,8 @@ create_preferences_dialog (GsmApplication *app)
else if (strcmp (current_tab, "disks") == 0)
gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), 2);
g_free (current_tab);
gtk_builder_connect_signals (builder, NULL);
g_object_unref (G_OBJECT (builder));
}
......
......@@ -1103,7 +1103,7 @@ proctable_update (GsmApplication *app)
int which = 0;
int arg = 0;
const char* whose_processes = g_settings_get_string (app->settings, GSM_SETTING_SHOW_WHOSE_PROCESSES);
char *whose_processes = g_settings_get_string (app->settings, GSM_SETTING_SHOW_WHOSE_PROCESSES);
if (strcmp (whose_processes, "all") == 0) {
which = GLIBTOP_KERN_PROC_ALL;
arg = 0;
......@@ -1114,6 +1114,7 @@ proctable_update (GsmApplication *app)
which = GLIBTOP_KERN_PROC_UID;
arg = getuid ();
}
g_free (whose_processes);
pid_list = glibtop_get_proclist (&proclist, which, arg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment