gnome-commander r2037 - in branches/gcmd-1-3: . src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r2037 - in branches/gcmd-1-3: . src
- Date: Thu, 4 Sep 2008 15:27:27 +0000 (UTC)
Author: epiotr
Date: Thu Sep 4 15:27:27 2008
New Revision: 2037
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=2037&view=rev
Log:
Fix for memory leak
Modified:
branches/gcmd-1-3/ChangeLog
branches/gcmd-1-3/src/gnome-cmd-file-list.cc
Modified: branches/gcmd-1-3/src/gnome-cmd-file-list.cc
==============================================================================
--- branches/gcmd-1-3/src/gnome-cmd-file-list.cc (original)
+++ branches/gcmd-1-3/src/gnome-cmd-file-list.cc Thu Sep 4 15:27:27 2008
@@ -442,22 +442,19 @@
{
g_return_if_fail (GNOME_CMD_IS_FILE_LIST (fl));
- const gchar *ext1, *ext2;
-
GnomeCmdFile *f = gnome_cmd_file_list_get_selected_file (fl);
if (!f) return;
- ext1 = gnome_cmd_file_get_extension (f);
+
+ const gchar *ext1 = gnome_cmd_file_get_extension (f);
if (!ext1) return;
- GList *sel = g_list_copy (gnome_cmd_file_list_get_selected_files (fl));
-
for (GList *tmp=gnome_cmd_file_list_get_all_files (fl); tmp; tmp = tmp->next)
{
GnomeCmdFile *finfo = (GnomeCmdFile *) tmp->data;
if (finfo && finfo->info)
{
- ext2 = gnome_cmd_file_get_extension (finfo);
+ const gchar *ext2 = gnome_cmd_file_get_extension (finfo);
if (ext2 && strcmp (ext1, ext2) == 0)
{
@@ -468,8 +465,6 @@
}
}
}
-
- g_list_free (sel);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]