gnome-build r564 - in trunk: . src/backends/libgbf_am



Author: naba
Date: Mon Jun  2 22:00:22 2008
New Revision: 564
URL: http://svn.gnome.org/viewvc/gnome-build?rev=564&view=rev

Log:
        * src/backends/libgbf_am/gbf-am-project.c
        (impl_get_config_modules), (impl_get_config_packages):
        fixed two mem-leaks.



Modified:
   trunk/ChangeLog
   trunk/src/backends/libgbf_am/gbf-am-project.c

Modified: trunk/src/backends/libgbf_am/gbf-am-project.c
==============================================================================
--- trunk/src/backends/libgbf_am/gbf-am-project.c	(original)
+++ trunk/src/backends/libgbf_am/gbf-am-project.c	Mon Jun  2 22:00:22 2008
@@ -3860,8 +3860,9 @@
 		gchar **modules = g_strsplit (pkg_modules, ", ", -1);
 		for (module = modules; *module != NULL; ++module) 
 		{
-			result = g_list_prepend (result, *module);
+			result = g_list_prepend (result, g_strdup (*module));
 		}
+		g_strfreev (modules);
 	}
 	return result;
 }
@@ -3922,10 +3923,12 @@
 					*version = '\0';
 				if (package_is_valid (*pkg))
 				{
-					result = g_list_append (result, *pkg);
+					result = g_list_append (result, 
+								g_strdup (*pkg));
 				}
-			}
-		}
+			}			
+			g_strfreev (pkgs);
+		}		
 	}
 	g_free (module_key);
 	return result;



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