Skip to content

Commit

Permalink
[gnc-plugin-page-account-tree.cpp] some memory leaks plugged
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed Mar 4, 2025
1 parent bc7fafd commit 12321ac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gnucash/gnome/gnc-plugin-page-account-tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,7 @@ commodity_mismatch_dialog (const Account* account, GtkWindow* parent)
response = gtk_dialog_run (GTK_DIALOG (error_dialog));
gtk_widget_destroy (error_dialog);
g_free (message);
g_free (account_name);
return response;
}

Expand Down Expand Up @@ -1529,6 +1530,7 @@ gnc_plugin_page_account_tree_cmd_delete_account (GSimpleAction *simple,
g_list_free(list);
return;
}
g_list_free (list);

window = gnc_plugin_page_get_window(GNC_PLUGIN_PAGE(page));
acct_name = gnc_account_get_full_name(account);
Expand All @@ -1542,6 +1544,7 @@ gnc_plugin_page_account_tree_cmd_delete_account (GSimpleAction *simple,
g_free(acct_name);
return;
}
g_free (acct_name);

// If no transaction or children just delete it.
if (xaccAccountGetSplits (account).empty() && gnc_account_n_children (account) == 0)
Expand Down

0 comments on commit 12321ac

Please sign in to comment.