SF.net SVN: geany: [1128] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Wed Dec 20 10:42:12 UTC 2006


Revision: 1128
          http://svn.sourceforge.net/geany/?rev=1128&view=rev
Author:   ntrel
Date:     2006-12-20 02:42:12 -0800 (Wed, 20 Dec 2006)

Log Message:
-----------
Fix strv leak in configuration_open_files().

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/keyfile.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-12-19 22:16:15 UTC (rev 1127)
+++ trunk/ChangeLog	2006-12-20 10:42:12 UTC (rev 1128)
@@ -1,3 +1,9 @@
+2006-12-20  Nick Treleaven  <nick.treleaven at btinternet.com>
+
+ * src/keyfile.c:
+   Fix strv leak in configuration_open_files().
+
+
 2006-12-18  Enrico Tröger  <enrico.troeger at uvena.de>
 
  * src/tools.c: Completed list of special characters, implemented

Modified: trunk/src/keyfile.c
===================================================================
--- trunk/src/keyfile.c	2006-12-19 22:16:15 UTC (rev 1127)
+++ trunk/src/keyfile.c	2006-12-20 10:42:12 UTC (rev 1128)
@@ -492,15 +492,17 @@
 {
 	gint i;
 	guint x, pos, y, len;
-	gchar *file, *locale_filename, **array, *tmp;
 	gboolean ret = FALSE, failure = FALSE;
 
 	i = app->tab_order_ltr ? 0 : (session_files->len - 1);
 	while (TRUE)
 	{
-		tmp = g_ptr_array_index(session_files, i);
+		gchar *tmp = g_ptr_array_index(session_files, i);
+
 		if (tmp && *tmp)
 		{
+			const gchar *file;
+			gchar *locale_filename, **array;
 			gint uid = -1;
 			x = 0;
 			y = 0;
@@ -523,6 +525,7 @@
 
 			// try to get the locale equivalent for the filename, fallback to filename if error
 			locale_filename = utils_get_locale_from_utf8(file);
+			g_strfreev(array);
 
 			if (g_file_test(locale_filename, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_SYMLINK))
 			{


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list