r22153 - gnucash/trunk/src/engine/test - [Testing] Fix potential leaks in Split teardown.

John Ralls jralls at code.gnucash.org
Thu Apr 19 16:11:53 EDT 2012


Author: jralls
Date: 2012-04-19 16:11:53 -0400 (Thu, 19 Apr 2012)
New Revision: 22153
Trac: http://svn.gnucash.org/trac/changeset/22153

Modified:
   gnucash/trunk/src/engine/test/utest-Split.c
Log:
[Testing] Fix potential leaks in Split teardown.

Modified: gnucash/trunk/src/engine/test/utest-Split.c
===================================================================
--- gnucash/trunk/src/engine/test/utest-Split.c	2012-04-19 20:00:33 UTC (rev 22152)
+++ gnucash/trunk/src/engine/test/utest-Split.c	2012-04-19 20:11:53 UTC (rev 22153)
@@ -50,9 +50,9 @@
 setup (Fixture *fixture, gconstpointer pData)
 {
     QofBook *book = qof_book_new ();
-    Transaction *txn = xaccMallocTransaction (book), *rtxn = NULL;
-    Account *acc = xaccMallocAccount (book), *racc = NULL;
-    GNCLot *lot = gnc_lot_new (book), *rlot = NULL;
+    Transaction *txn = xaccMallocTransaction (book);
+    Account *acc = xaccMallocAccount (book);
+    GNCLot *lot = gnc_lot_new (book);
     gnc_numeric value = gnc_numeric_create (123, 240);
     gnc_numeric amount = gnc_numeric_create (321, 1000);
     Timespec time = timespec_now ();
@@ -100,6 +100,8 @@
     test_destroy (txn);
     test_destroy (acc);
     test_destroy (fixture->split);
+    test_destroy (fixture->curr);
+    test_destroy (fixture->comm);
     test_destroy (book);
     g_free (fixture->func);
 



More information about the gnucash-changes mailing list