Christopher Lam
6bf5a618de
qof_instance_get gchar* must be freed
...
A call to qof_instance_get expecting a gchar* receives a newly
allocated string which must be freed.
5 years ago
Christopher Lam
e4d808e674
[qofbook] qof_book_use_split_action_for_num_field: free a char*
...
qof_instance_get allocates a new char* which must be freed.
5 years ago
Christopher Lam
40d886fa9d
gnc_account_list_name_violations elements must be freed
5 years ago
Christopher Lam
4c37f6d4ef
[account.cpp] gnc_g_list_stringjoin instead of repeated allocations
5 years ago
Christopher Lam
bedc85afa3
Merge branch 'maint-leaks' into maint #1101
5 years ago
Christopher Lam
0420ae6a66
[account.cpp] refactor gnc_account_list_name_violations
5 years ago
Christopher Lam
67bd513514
[account.cpp] rewrite gnc_account_foreach_descendant_until in C++
5 years ago
Christopher Lam
17953441cb
[account.cpp] refactor gnc_account_foreach_descendant
5 years ago
Christopher Lam
5698b67bf5
[account.cpp] refactor gnc_account_lookup_by_code
5 years ago
Christopher Lam
09e2e7613c
[account.cpp] refactor gnc_account_lookup_by_name
5 years ago
Christopher Lam
bebc366e88
[account.cpp] refactor gnc_account_n_descendants
5 years ago
John Ralls
f0926d66c1
Merge Simon Arlott's 'qof-instance-dispose' into maint.
5 years ago
Christopher Lam
e6c33a39bc
[account.cpp] refactor gnc_account_get_descendants{_sorted}
5 years ago
Christopher Lam
d2db43019c
[account.cpp] internal function account_foreach_descendant
...
fast and efficient
5 years ago
Christopher Lam
de1ad9367a
g_free gnc_ctime which returns a new gchar*
5 years ago
Simon Arlott
7a0ea190ca
qof_instance_dispose should always complete dispose processes
...
If QofInstancePrivate has no collection then qof_instance_dispose() returns
without completing the rest of its dispose processes, skipping removal of
its type string from the string cache resulting in a reference count leak.
Change the check for a collection so that it only affects the call to
qof_collection_remove_entity().
5 years ago
John Ralls
9062be3d47
Merge Simon Arlott's 'string-cache-fixes' into maint.
5 years ago
Simon Arlott
4a5b5f3bf2
Don't cache the empty string
...
Avoid unnecessary reference counting for uses of the empty string.
5 years ago
Simon Arlott
320df7e409
Use const return values for string cache
...
This is a prerequisite for being able to return "" (which is const) and
none of the returned values should ever be modified.
5 years ago
Simon Arlott
4132939612
Avoid leaking string cache entries for "" in Transaction and Split
...
When g_object_new() is used, the strings that default to "" are added to
the string cache. These are then not correctly removed when updating them
with new values when cloning a Transaction/Split.
Use CACHE_REPLACE instead of CACHE_INSERT.
5 years ago
Robert Fewell
0f026f6a10
Bug 798221 - Transfer funds between accounts with different currencies crashes Gnucash on macOS
...
In the scrub function find_account_matching_name_in_list there was a
test for account names being the same for currency but condition was
backwards so was matching on account names being different. There was
also a g_list_free resulting in a double free which was removed.
5 years ago
Simon Arlott
08b56e9669
[gnc-pricedb] Don't lookup old prices when doing bulk updates
5 years ago
Hong Xu
0fd0aca531
Explain out what AsOfDate means in the doc
...
As discussed at
https://lists.gnucash.org/pipermail/gnucash-user/2021-June/096893.html
5 years ago
John Ralls
601eb51361
Improve transaction sorting on effective num field.
...
Inspired by PR #983 . Transaction sorting on num broke down if the
user had a non-numeric string or a number larger than an int in
the effective num field (might be split-action if the option is set).
The comparison first tries to use strtoull on the two strings and
compares the results. If they're both nonzero and different then the
numeric order is returned. If they're both nonzero but the same the
unconverted parts of each are passed to g_utf8_collate; if either is 0
then the whole strings are passed to g_utf8_collate. strtoull will
return 0 for a negative number.
5 years ago
John Ralls
985a6420fc
Bug 798196 - not building with Boost 1.76
5 years ago
John Ralls
6aa35ea7fb
Better fix for bug 798204, doesn't break trading account selection.
5 years ago
John Ralls
9eeff5dd7e
Bug 798204 - Creation of Imbalance Accounts
...
Search recursively when getting account by name.
5 years ago
John Ralls
68ec80e68d
Bug 798203 - g_assert fault while reversing transaction
...
* Re-commit the original transaction to ensure that there aren't
any stray trading splits.
* If the original and cloned transactions have a different number of
splits don't leak the cloned transaction.
* Check that the cloned transaction isn't NULL before trying to invert
it.
5 years ago
John Ralls
80d6749989
Bug 787813 - Price change from editing a transaction not reflected...
...
in pricedb.
Allow PRICE_SOURCE_SPLIT_REG to overwrite PRICE_SOURCE_XFER_DLG_VAL.
5 years ago
Christopher Lam
321b5efabc
Merge branch 'maint-leaks' into maint #1019
5 years ago
John Ralls
42213c597c
Bug 798199 - Pasting invalid value in date column crashes GnuCash
...
Catch boost::gregorian::bad_year in LDT_from_struct_tm and rethrow
std::invalid_argument for C wrappers to catch and handle.
5 years ago
Christopher Lam
b095d1e7da
Revert "[qofquery] q->terms g_list members must be freed"
...
This reverts commit a3e3823ee7 .
Already freed earlier in the same function.
5 years ago
Christopher Lam
c8a7b9edb3
[Account] g_value_unset
5 years ago
Christopher Lam
bfdec74a48
[qof-backend] gchar * gnc_path_get_pkglibdir must be g_freed
5 years ago
Christopher Lam
f6a9be45ba
[Split] g_value_unset
5 years ago
Christopher Lam
36901c5751
[gncJob] g_value_unset
5 years ago
Christopher Lam
1824a30bd0
[gncinvoice] g_value_unset
5 years ago
Christopher Lam
badd976e11
[gnc-lot] g_value_unset
5 years ago
Christopher Lam
c9565abe8b
[gnc-commodity] g_value_unset
5 years ago
Christopher Lam
302020fcb7
[gnc-budget] g_value_unset
5 years ago
Christopher Lam
ceeb1dff7a
[scrub.c] g_value_unset
5 years ago
Christopher Lam
92cd437562
[Transaction.c] g_value_unset to release GValue string
5 years ago
Christopher Lam
3353d3950b
[gnc-budget] g_value_unset GValue
5 years ago
Christopher Lam
a3e3823ee7
[qofquery] q->terms g_list members must be freed
5 years ago
Christopher Lam
8a6413342d
[SchedXaction] free GList*
5 years ago
Christopher Lam
c5585ebe2c
[gncInvoice] free GList*
5 years ago
Christopher Lam
d611538ae7
[gncTaxtable] free GSList*
5 years ago
Christopher Lam
b3101c9385
[gnc-pricedb.c] plug GList leak
5 years ago
Christopher Lam
8a56a00313
Modify documentation for gncEntryComputeValue
...
Modify documentation for be19b489e
5 years ago
John Ralls
da3c511b6c
Remove trading splits instead of trying to adjust them.
5 years ago