From 57e403b048083d7592450cf832aebb81de8b3681 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Sat, 12 Oct 2019 09:29:40 -0700 Subject: [PATCH] Fix segfault in test-portfolios after debug build. gnc-clear-current-session deletes the pricedb so deleting it first is unnecessary. Deleting it first and not nulling the pointer in the book leads to accessing freed memory, and debug mode poisons that to force a crash when it happens. --- gnucash/report/standard-reports/test/test-portfolios.scm | 3 --- 1 file changed, 3 deletions(-) diff --git a/gnucash/report/standard-reports/test/test-portfolios.scm b/gnucash/report/standard-reports/test/test-portfolios.scm index 6ce643e8e9..c72ac82613 100644 --- a/gnucash/report/standard-reports/test/test-portfolios.scm +++ b/gnucash/report/standard-reports/test/test-portfolios.scm @@ -56,9 +56,6 @@ (test-assert (format #f "wrong-option ~a ~a" section name) #f)))) (define (teardown) - (gnc-pricedb-destroy - (gnc-pricedb-get-db - (gnc-get-current-book))) (gnc-clear-current-session)) (define (null-test variant uuid)