bug-buddy r2544 - in branches/gnome-2-22: . gnome-breakpad



Author: cosimoc
Date: Mon Jul 14 18:11:39 2008
New Revision: 2544
URL: http://svn.gnome.org/viewvc/bug-buddy?rev=2544&view=rev

Log:
2008-07-14  Cosimo Cecchi,,,  <cosimoc gnome org>

	* gnome-breakpad/gnome-breakpad.cc:
	Fix some leaks.
	Patch by Hans Petter Jansson (#484728).


Modified:
   branches/gnome-2-22/ChangeLog
   branches/gnome-2-22/gnome-breakpad/gnome-breakpad.cc

Modified: branches/gnome-2-22/gnome-breakpad/gnome-breakpad.cc
==============================================================================
--- branches/gnome-2-22/gnome-breakpad/gnome-breakpad.cc	(original)
+++ branches/gnome-2-22/gnome-breakpad/gnome-breakpad.cc	Mon Jul 14 18:11:39 2008
@@ -101,6 +101,7 @@
 {
 	char *dir;
 	char *tries[N_TRIES];
+	gboolean result = false;
 	int i;
 
 	dir = g_path_get_dirname (filename);
@@ -111,11 +112,16 @@
 	g_free (dir);
 
 	for (i = 0; i < N_TRIES; ++i) {
-		if (g_file_test (tries[i], G_FILE_TEST_EXISTS))
-			return true;
+		if (g_file_test (tries[i], G_FILE_TEST_EXISTS)) {
+			result = true;
+			break;
+		}
 	}
 
-	return false;
+	for (i = 0; i < N_TRIES; i++)
+		g_free (tries [N_TRIES]);
+
+	return result;
 }
 	
 



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