mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix small memory leak - unfreed string.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16066 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
0a179cf181
commit
d0f4e853c4
@ -908,8 +908,8 @@ gnc_gconf_schemas_found (void)
|
||||
|
||||
key = gnc_gconf_make_schema_key(GCONF_GENERAL_REGISTER, "use_theme_colors");
|
||||
schema = gconf_client_get_schema(our_client, key, &err);
|
||||
if (schema == NULL) {
|
||||
g_free(key);
|
||||
if (schema == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
gconf_schema_free(schema);
|
||||
|
@ -397,7 +397,7 @@ gnc_main_window_summary_refresh (GNCMainSummary * summary)
|
||||
gtk_combo_box_set_model(GTK_COMBO_BOX(summary->totals_combo), NULL);
|
||||
gtk_list_store_clear(summary->datamodel);
|
||||
for (current = g_list_first(currency_list); current; current = g_list_next(current)) {
|
||||
const char *mnemonic;
|
||||
const char *mnemonic, *total_mode_label;
|
||||
|
||||
currency_accum = current->data;
|
||||
|
||||
@ -420,13 +420,15 @@ gnc_main_window_summary_refresh (GNCMainSummary * summary)
|
||||
gnc_commodity_print_info(currency_accum->currency, TRUE));
|
||||
|
||||
gtk_list_store_append(summary->datamodel, &iter);
|
||||
total_mode_label = get_total_mode_label(mnemonic, currency_accum->total_mode);
|
||||
gtk_list_store_set(summary->datamodel, &iter,
|
||||
COLUMN_MNEMONIC_TYPE, get_total_mode_label(mnemonic, currency_accum->total_mode),
|
||||
COLUMN_MNEMONIC_TYPE, total_mode_label,
|
||||
COLUMN_ASSETS, _("Assets:"),
|
||||
COLUMN_ASSETS_VALUE, asset_amount_string,
|
||||
COLUMN_PROFITS, _("Profits:"),
|
||||
COLUMN_PROFITS_VALUE, profit_amount_string,
|
||||
-1);
|
||||
g_free(total_mode_label);
|
||||
}
|
||||
gtk_combo_box_set_model(GTK_COMBO_BOX(summary->totals_combo),
|
||||
GTK_TREE_MODEL(summary->datamodel));
|
||||
|
Loading…
Reference in New Issue
Block a user