[test-autoclear] plug memory leaks

This commit is contained in:
Christopher Lam 2023-09-14 22:30:48 +08:00
parent 49c3c5dc2e
commit 5a8ee33f06

View File

@ -145,12 +145,15 @@ TEST_P(AutoClearTest, DoesAutoClear) {
xaccSplitSetReconcile(split, CREC);
}
g_list_free (splits_to_clear);
ASSERT_STREQ(err, t.expectedErr);
if (t.expectedErr == NULL) {
gnc_numeric c = xaccAccountGetClearedBalance(m_account);
ASSERT_EQ(c.num, t.amount);
ASSERT_EQ(c.denom, DENOM);
}
g_free (err);
}
}