[gnome-system-monitor/migrateui] Free memory allocated for gtkbuilders and filenames



commit 696ee873b2d937fcde3e84d7f938770abb0bc9fb
Author: Robert Roth <robert roth off gmail com>
Date:   Sun Jul 22 10:05:11 2012 +0300

    Free memory allocated for gtkbuilders and filenames

 src/lsof.cpp        |    3 +++
 src/openfiles.cpp   |    2 ++
 src/procdialogs.cpp |    2 +-
 3 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/lsof.cpp b/src/lsof.cpp
index 6e7490d..723dae9 100644
--- a/src/lsof.cpp
+++ b/src/lsof.cpp
@@ -353,5 +353,8 @@ void procman_lsof(ProcData *procdata)
     gtk_builder_connect_signals (builder, NULL);
 
     gtk_widget_show_all(dialog);
+    
+    g_object_unref (G_OBJECT (builder));
+    g_free (filename);
 }
 
diff --git a/src/openfiles.cpp b/src/openfiles.cpp
index 32cd498..9c4b36f 100644
--- a/src/openfiles.cpp
+++ b/src/openfiles.cpp
@@ -368,6 +368,8 @@ create_single_openfiles_dialog (GtkTreeModel *model, GtkTreePath *path,
 
     update_openfiles_dialog (tree);
 
+    g_object_unref (G_OBJECT (builder));
+    g_free (filename);
 }
 
 
diff --git a/src/procdialogs.cpp b/src/procdialogs.cpp
index bbe956f..904b24e 100644
--- a/src/procdialogs.cpp
+++ b/src/procdialogs.cpp
@@ -208,7 +208,7 @@ procdialog_create_renice_dialog (ProcData *procdata)
     gtk_builder_connect_signals (builder, NULL);
 
     g_object_unref (G_OBJECT (builder));
-    //g_free (filename);
+    g_free (filename);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]