mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Close some memory leaks identified by valgrind.
This commit is contained in:
parent
acdd5d0208
commit
40c543ef21
@ -109,6 +109,8 @@ static GSettings * gnc_gsettings_get_schema_ptr (const gchar *schema_str)
|
|||||||
PWARN ("Ignoring attempt to access unknown gsettings schema %s", full_name);
|
PWARN ("Ignoring attempt to access unknown gsettings schema %s", full_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_free(full_name);
|
||||||
|
|
||||||
LEAVE("");
|
LEAVE("");
|
||||||
return gset;
|
return gset;
|
||||||
}
|
}
|
||||||
|
@ -606,8 +606,10 @@ gnc_filepath_locate_pixmap (const gchar *name)
|
|||||||
{
|
{
|
||||||
gchar *default_path;
|
gchar *default_path;
|
||||||
gchar *fullname;
|
gchar *fullname;
|
||||||
|
gchar* pkgdatadir = gnc_path_get_pkgdatadir ();
|
||||||
|
|
||||||
default_path = g_build_filename (gnc_path_get_pkgdatadir (), "pixmaps", NULL);
|
default_path = g_build_filename (pkgdatadir, "pixmaps", NULL);
|
||||||
|
g_free(pkgdatadir);
|
||||||
fullname = gnc_filepath_locate_file (default_path, name);
|
fullname = gnc_filepath_locate_file (default_path, name);
|
||||||
g_free(default_path);
|
g_free(default_path);
|
||||||
|
|
||||||
@ -619,8 +621,10 @@ gnc_filepath_locate_ui_file (const gchar *name)
|
|||||||
{
|
{
|
||||||
gchar *default_path;
|
gchar *default_path;
|
||||||
gchar *fullname;
|
gchar *fullname;
|
||||||
|
gchar* pkgdatadir = gnc_path_get_pkgdatadir ();
|
||||||
|
|
||||||
default_path = g_build_filename (gnc_path_get_pkgdatadir (), "ui", NULL);
|
default_path = g_build_filename (pkgdatadir, "ui", NULL);
|
||||||
|
g_free(pkgdatadir);
|
||||||
fullname = gnc_filepath_locate_file (default_path, name);
|
fullname = gnc_filepath_locate_file (default_path, name);
|
||||||
g_free(default_path);
|
g_free(default_path);
|
||||||
|
|
||||||
|
@ -1059,6 +1059,7 @@ gnc_tree_view_set_state_section (GncTreeView *view,
|
|||||||
g_free (column_name);
|
g_free (column_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
g_strfreev(keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Rebuild the column visibility menu */
|
/* Rebuild the column visibility menu */
|
||||||
|
@ -564,8 +564,10 @@ gnc_plugin_page_budget_recreate_page (GtkWidget *window, GKeyFile *key_file,
|
|||||||
}
|
}
|
||||||
if (!string_to_guid(guid_str, &guid))
|
if (!string_to_guid(guid_str, &guid))
|
||||||
{
|
{
|
||||||
|
g_free(guid_str);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
g_free(guid_str);
|
||||||
|
|
||||||
book = qof_session_get_book(gnc_get_current_session());
|
book = qof_session_get_book(gnc_get_current_session());
|
||||||
bgt = gnc_budget_lookup(&guid, book);
|
bgt = gnc_budget_lookup(&guid, book);
|
||||||
|
@ -298,6 +298,7 @@ gsr2_create_table (GNCSplitReg2 *gsr)
|
|||||||
|
|
||||||
/* Restore the sort depth from saved state */
|
/* Restore the sort depth from saved state */
|
||||||
model->sort_depth = g_key_file_get_integer (state_file, state_section, "sort_depth", NULL);
|
model->sort_depth = g_key_file_get_integer (state_file, state_section, "sort_depth", NULL);
|
||||||
|
g_free(state_section);
|
||||||
|
|
||||||
s_model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
|
s_model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
|
||||||
if (s_model)
|
if (s_model)
|
||||||
|
Loading…
Reference in New Issue
Block a user