mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
(cppcheck) Fix a possible memory leak
Patch by Aurimas Fišeras. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21200 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
73e9f51253
commit
8b3650e07f
@ -1436,7 +1436,6 @@ get_random_transaction_with_currency(QofBook *book,
|
||||
gint num;
|
||||
gchar *numstr;
|
||||
|
||||
numstr = g_new0(gchar, 10);
|
||||
if (!account_list)
|
||||
{
|
||||
account_list = gnc_account_get_descendants (gnc_book_get_root_account (book));
|
||||
@ -1450,6 +1449,8 @@ get_random_transaction_with_currency(QofBook *book,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
numstr = g_new0(gchar, 10);
|
||||
|
||||
trans = xaccMallocTransaction(book);
|
||||
|
||||
xaccTransBeginEdit(trans);
|
||||
|
Loading…
Reference in New Issue
Block a user