r18146 - gnucash/trunk/src/business/business-core/sql - Fix memory leak - string not freed when creating SELECT statement
Phil Longstaff
plongstaff at code.gnucash.org
Sun Jun 21 12:11:08 EDT 2009
Author: plongstaff
Date: 2009-06-21 12:11:08 -0400 (Sun, 21 Jun 2009)
New Revision: 18146
Trac: http://svn.gnucash.org/trac/changeset/18146
Modified:
gnucash/trunk/src/business/business-core/sql/gnc-tax-table-sql.c
Log:
Fix memory leak - string not freed when creating SELECT statement
Modified: gnucash/trunk/src/business/business-core/sql/gnc-tax-table-sql.c
===================================================================
--- gnucash/trunk/src/business/business-core/sql/gnc-tax-table-sql.c 2009-06-21 14:38:44 UTC (rev 18145)
+++ gnucash/trunk/src/business/business-core/sql/gnc-tax-table-sql.c 2009-06-21 16:11:08 UTC (rev 18146)
@@ -189,6 +189,7 @@
g_value_set_string( &value, guid_buf );
buf = g_strdup_printf( "SELECT * FROM %s WHERE taxtable='%s'", TTENTRIES_TABLE_NAME, guid_buf );
stmt = gnc_sql_connection_create_statement_from_sql( be->conn, buf );
+ g_free( buf );
result = gnc_sql_execute_select_statement( be, stmt );
gnc_sql_statement_dispose( stmt );
if( result != NULL ) {
More information about the gnucash-changes
mailing list