gnucash maint: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sat Jul 10 15:19:08 EDT 2021


Updated	 via  https://github.com/Gnucash/gnucash/commit/083035ae (commit)
	 via  https://github.com/Gnucash/gnucash/commit/f51474d9 (commit)
	from  https://github.com/Gnucash/gnucash/commit/659e43f9 (commit)



commit 083035aee7e5b6d8ef62632df818068b2ab870e6
Merge: 659e43f93 f51474d9b
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Jul 10 12:15:28 2021 -0700

    Merge Simon Arlott's 'bug-798234' into maint.

commit f51474d9bb1131fa0c4cc5b4d648f1d7944cefb5
Author: Simon Arlott <sa.me.uk>
Date:   Wed Jul 7 20:56:58 2021 +0100

    Bug 798234 - Cut Transaction discards the reference to the description/memo strings so that Paste Transaction will paste uninitialised data (or other strings)
    
    When a transaction is cut, any globally unique description and memo strings
    that are referenced by FloatingTxn/FloatingSplit will refer to memory that
    has been freed. This results in uninitialised data (or other strings) being
    inserted when the transaction is pasted.
    
    These strings are in the string cache so take a new reference to them when
    copying them to the FloatingTxn/FloatingSplit.
    
    Fix memory leaks of FloatingTxn and FloatingSplit when they're used
    temporarily.
    
    Fix memory leak in FloatingTxn by freeing the m_splits list too.



Summary of changes:
 .../register/ledger-core/split-register-copy-ops.c | 45 ++++++++++++++++------
 .../register/ledger-core/split-register-copy-ops.h |  4 ++
 gnucash/register/ledger-core/split-register.c      |  6 ++-
 .../test/utest-split-register-copy-ops.c           | 10 ++---
 4 files changed, 44 insertions(+), 21 deletions(-)



More information about the gnucash-patches mailing list