Commit 00c68a14 authored by Sebastien Granjoux's avatar Sebastien Granjoux

Fix a few memory leaks thanks to Valgrind

	* plugins/gtodo/interface.c,
	plugins/gtodo/libgtodo.c,
	plugins/symbol-db/symbol-db-engine-core.c,
	libanjuta/anjuta-plugin-manager.c:
	Fix a few memory leaks thanks to Valgrind

svn path=/trunk/; revision=4813
parent 295c07af
2009-03-01 Sébastien Granjoux <seb.sfo@free.fr>
* plugins/gtodo/interface.c,
plugins/gtodo/libgtodo.c,
plugins/symbol-db/symbol-db-engine-core.c,
libanjuta/anjuta-plugin-manager.c:
Fix a few memory leaks thanks to Valgrind
2009-02-28 Sébastien Granjoux <seb.sfo@free.fr>
* plugins/build-basic-autotools/plugin.c:
......@@ -1982,6 +1982,7 @@ anjuta_plugin_manager_select (AnjutaPluginManager *plugin_manager,
gchar *icon_path = NULL;
icon_path = g_strconcat (PACKAGE_PIXMAPS_DIR"/",
icon_filename, NULL);
g_free (icon_filename);
/* DEBUG_PRINT ("Icon: %s", icon_path); */
icon_pixbuf =
gdk_pixbuf_new_from_file (icon_path, NULL);
......@@ -2009,19 +2010,20 @@ anjuta_plugin_manager_select (AnjutaPluginManager *plugin_manager,
{
g_warning ("Plugin does not define Description attribute");
}
if (!anjuta_plugin_description_get_string (desc,
"Anjuta Plugin",
"Location",
&location))
{
g_warning ("Plugin does not define Location attribute");
}
if (plugin_name && plugin_desc)
{
GtkTreeIter iter;
gchar *text;
if (!anjuta_plugin_description_get_string (desc,
"Anjuta Plugin",
"Location",
&location))
{
g_warning ("Plugin does not define Location attribute");
}
text = g_markup_printf_escaped ("<span size=\"larger\" weight=\"bold\">%s</span>\n%s", plugin_name, plugin_desc);
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
......@@ -2037,6 +2039,8 @@ anjuta_plugin_manager_select (AnjutaPluginManager *plugin_manager,
selection_ids = g_list_prepend (selection_ids, location);
}
g_free (plugin_name);
g_free (plugin_desc);
node = g_list_next (node);
}
......
......@@ -264,14 +264,13 @@ static void stock_icons()
/* testing icon factory.. hope it works a little */
factory = gtk_icon_factory_new();
/* random icon */
icons = gtk_icon_set_new();
icon_source = gtk_icon_source_new();
icons = gtk_icon_set_new();
gtk_icon_source_set_filename(icon_source, PIXMAP_PATH"/gtodo-edit.png");
gtk_icon_set_add_source(icons, icon_source);
gtk_icon_factory_add(factory, "gtodo-edit", icons);
icons = gtk_icon_set_new();
icon_source = gtk_icon_source_new();
gtk_icon_source_set_filename(icon_source, PIXMAP_PATH"/"ICON_FILE);
gtk_icon_set_add_source(icons, icon_source);
gtk_icon_factory_add(factory, "gtodo", icons);
......@@ -279,12 +278,13 @@ static void stock_icons()
/* added this because there isn no about availible in the default stock set. */
/* I call it gnome about so it still uses the one out off the current icon theme */
icons = gtk_icon_set_new();
icon_source = gtk_icon_source_new();
gtk_icon_source_set_filename(icon_source, PIXMAP_PATH"/gtodo-about.png");
gtk_icon_set_add_source(icons, icon_source);
gtk_icon_factory_add(factory, "gnome-stock-about", icons);
gtk_icon_factory_add_default (factory);
gtk_icon_source_free (icon_source);
}
void gtodo_set_hide_done(gboolean hide_it)
......
......@@ -828,6 +828,7 @@ GTodoClient * gtodo_client_new_default(GError **error)
cl = g_malloc0(sizeof(GTodoClient));
default_uri = g_strdup_printf("/%s/.gtodo/todos", g_getenv("HOME"));
cl->xml_file = g_file_new_for_path (default_uri);
g_free (default_uri);
/* check, open or create the correct xml file */
if(!gtodo_client_check_file(cl, &tmp_error))
{
......
......@@ -2962,6 +2962,7 @@ symbol_db_engine_open_db (SymbolDBEngine * dbe, const gchar * base_db_path,
DEBUG_PRINT ("symbol_db_engine_open_db (): opening/connecting to "
"database with %s...", cnc_string);
sdb_engine_connect_to_db (dbe, cnc_string);
g_free (cnc_string);
if (needs_tables_creation == TRUE)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment