mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
Plug more memory leaks
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20004 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -620,16 +620,16 @@ gnc_dbi_unlock( QofBackend *qbe )
|
||||
PWARN("No lock table in database, so not unlocking it.");
|
||||
return;
|
||||
}
|
||||
dbi_result_free( result );
|
||||
|
||||
if ( ( result = dbi_conn_query( dcon, "BEGIN" )) )
|
||||
result = dbi_conn_query( dcon, "BEGIN" );
|
||||
if ( result )
|
||||
{
|
||||
/* Delete the entry if it's our hostname and PID */
|
||||
gchar hostname[ GNC_HOST_NAME_MAX + 1 ];
|
||||
if (result)
|
||||
{
|
||||
dbi_result_free( result );
|
||||
result = NULL;
|
||||
}
|
||||
|
||||
dbi_result_free( result );
|
||||
result = NULL;
|
||||
memset( hostname, 0, sizeof(hostname) );
|
||||
gethostname( hostname, GNC_HOST_NAME_MAX );
|
||||
result = dbi_conn_queryf( dcon, "SELECT * FROM %s WHERE Hostname = '%s' AND PID = '%d'", lock_table, hostname, (int)GETPID() );
|
||||
@@ -653,7 +653,7 @@ gnc_dbi_unlock( QofBackend *qbe )
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (result)
|
||||
else
|
||||
{
|
||||
dbi_result_free( result );
|
||||
result = NULL;
|
||||
|
||||
@@ -264,6 +264,7 @@ load_all_accounts( GncSqlBackend* be )
|
||||
gnc_account_append_child( pParent, s->pAccount );
|
||||
next_elem = g_list_next( elem );
|
||||
l_accounts_needing_parents = g_list_delete_link( l_accounts_needing_parents, elem );
|
||||
g_free( s );
|
||||
elem = next_elem;
|
||||
progress_made = TRUE;
|
||||
}
|
||||
@@ -285,6 +286,7 @@ load_all_accounts( GncSqlBackend* be )
|
||||
{
|
||||
gnc_account_append_child( root, s->pAccount );
|
||||
}
|
||||
g_free( s );
|
||||
l_accounts_needing_parents = g_list_delete_link( l_accounts_needing_parents, l_accounts_needing_parents );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user