mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Stop leaking and re-inserting Split slots
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23450 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
96b258fada
commit
0317eedf39
@ -588,7 +588,7 @@ commit_split( GncSqlBackend* be, QofInstance* inst )
|
|||||||
op = OP_DB_UPDATE;
|
op = OP_DB_UPDATE;
|
||||||
}
|
}
|
||||||
is_ok = gnc_sql_do_db_operation( be, op, SPLIT_TABLE, GNC_ID_SPLIT, inst, split_col_table );
|
is_ok = gnc_sql_do_db_operation( be, op, SPLIT_TABLE, GNC_ID_SPLIT, inst, split_col_table );
|
||||||
if ( is_ok )
|
if ( is_ok && !qof_instance_get_destroying (inst))
|
||||||
{
|
{
|
||||||
is_ok = gnc_sql_slots_save( be,
|
is_ok = gnc_sql_slots_save( be,
|
||||||
qof_instance_get_guid( inst ),
|
qof_instance_get_guid( inst ),
|
||||||
|
@ -530,6 +530,9 @@ xaccFreeSplit (Split *split)
|
|||||||
|
|
||||||
split->date_reconciled.tv_sec = 0;
|
split->date_reconciled.tv_sec = 0;
|
||||||
split->date_reconciled.tv_nsec = 0;
|
split->date_reconciled.tv_nsec = 0;
|
||||||
|
if (split->inst.kvp_data)
|
||||||
|
kvp_frame_delete(split->inst.kvp_data);
|
||||||
|
split->inst.kvp_data = NULL;
|
||||||
|
|
||||||
// Is this right?
|
// Is this right?
|
||||||
if (split->gains_split) split->gains_split->gains_split = NULL;
|
if (split->gains_split) split->gains_split->gains_split = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user