gnucash stable: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sat Apr 29 14:58:37 EDT 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/df878c6a (commit)
	 via  https://github.com/Gnucash/gnucash/commit/71802b56 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/6be682b6 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/0d86be6d (commit)
	 via  https://github.com/Gnucash/gnucash/commit/ed3fe008 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/35aeed45 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/bd94965d (commit)
	from  https://github.com/Gnucash/gnucash/commit/168765cf (commit)



commit df878c6a3deea44c29028b852cf35d692f7a8631
Merge: 168765cf77 71802b5627
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Apr 29 11:54:41 2023 -0700

    Merge Maarten Bosmans's 'memleak-fixes' into stable.

commit 71802b5627c94097f13549310be47c9f4bf5ac40
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date:   Sat Mar 18 12:30:03 2023 +0100

    [test] Fix memory leak in test-gnc-quotes
    
    When the commodity table is registered, the current book will get
    a default table assigned.  When later setting the table explicitly
    using qof_book_set_data() the exisiting table gets overwritten and
    is thus leaked.
    
    There is no way of removing or freeing a currency table from a book,
    so the best we can do here is to set our own table on the book before
    calling gnc_commodity_table_register().

commit 6be682b6459c6a7015a783bcab5e6387d140fe77
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date:   Fri Mar 17 21:39:26 2023 +0100

    Store allocated temporaries in a variable so they can be freed
    
    If a function that returns an allocated pointer is passed directly into
    something that does not take ownership of the pointer, the allocation is
    leaked.  This can be fixed by assigning the pointer to a new variable
    and freeing it after operation on the memory.

commit 0d86be6d2adeae336028126c817bd592ed5a2fa0
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date:   Fri Mar 17 21:16:01 2023 +0100

    [test] Properly destroy resources on end of tests
    
    This fixes memory leaks that are only present in testing code.
    Not very useful on itself, but it does make it easier to fix memory
    leaks and other AddressSanitizer problems in actual gnucash code later.

commit ed3fe008807edc77b1e201147d11a3fe371d4c55
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date:   Fri Mar 17 21:10:44 2023 +0100

    [test] Use test fixture to initialize and destroy resources

commit 35aeed45ec4b8c1246dbec71de36e5a2136ece07
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date:   Thu Mar 16 22:08:10 2023 +0100

    [engine] Remove two replace functions from KvpValue
    
    These were not used outside a test.
    
    And that test was not leak free, as a result of the functions not doing
    what they are supposed to do when the current value is not of the type
    that is expected. (NULL is returned, but the value is not replaced)

commit bd94965d9b0eb2f64a188aa44ec86b679c31a993
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date:   Thu Mar 16 19:55:35 2023 +0100

    [backend/xml] Remove unused string copy



Summary of changes:
 libgnucash/app-utils/gnc-quotes.cpp                |  7 +--
 libgnucash/app-utils/test/gtest-gnc-quotes.cpp     | 23 ++++++---
 .../backend/sql/gnc-sql-column-table-entry.cpp     | 14 +++---
 libgnucash/backend/xml/sixtp-dom-generators.cpp    |  4 --
 .../core-utils/test/gtest-path-utilities.cpp       | 39 +++++++++------
 libgnucash/engine/kvp-value.cpp                    | 20 --------
 libgnucash/engine/kvp-value.hpp                    | 16 -------
 libgnucash/engine/test/gtest-qofquerycore.cpp      | 55 +++++++++++++++-------
 libgnucash/engine/test/test-account-object.cpp     |  3 +-
 libgnucash/engine/test/test-guid.cpp               | 19 +++++---
 libgnucash/engine/test/test-kvp-value.cpp          | 13 -----
 libgnucash/engine/test/test-lots.cpp               |  4 +-
 libgnucash/engine/test/test-query.cpp              |  9 ++--
 13 files changed, 109 insertions(+), 117 deletions(-)



More information about the gnucash-patches mailing list