mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[gnc-plugin-page-register] xaccTransGetAPARAcctSplitList must be freed
This commit is contained in:
parent
d79b2ea371
commit
fc67b03e5c
@ -4697,14 +4697,18 @@ static GncInvoice* invoice_from_split (Split* split)
|
||||
GList* invoices_from_transaction (Transaction* trans)
|
||||
{
|
||||
GList *invoices = NULL;
|
||||
GList *apar_splits;
|
||||
if (!trans) return NULL;
|
||||
|
||||
for (GList *node = xaccTransGetAPARAcctSplitList(trans, TRUE); node;
|
||||
node = node->next)
|
||||
apar_splits = xaccTransGetAPARAcctSplitList (trans, TRUE);
|
||||
if (!apar_splits) return NULL;
|
||||
|
||||
for (GList *node = apar_splits; node; node = node->next)
|
||||
{
|
||||
GncInvoice* inv = invoice_from_split ((Split*) node->data);
|
||||
if (inv) invoices = g_list_prepend (invoices, inv);
|
||||
}
|
||||
g_list_free (apar_splits);
|
||||
return invoices;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user