[GRASS-SVN] r50362 - grass/trunk/lib/db/dbmi_client
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jan 21 13:26:57 EST 2012
Author: mmetz
Date: 2012-01-21 10:26:57 -0800 (Sat, 21 Jan 2012)
New Revision: 50362
Modified:
grass/trunk/lib/db/dbmi_client/select.c
Log:
db lib: fix symptom of memory leak, not (yet) cause
Modified: grass/trunk/lib/db/dbmi_client/select.c
===================================================================
--- grass/trunk/lib/db/dbmi_client/select.c 2012-01-21 18:19:14 UTC (rev 50361)
+++ grass/trunk/lib/db/dbmi_client/select.c 2012-01-21 18:26:57 UTC (rev 50362)
@@ -132,7 +132,7 @@
G_debug(3, " SQL: %s", buf);
db_init_string(&stmt);
- db_append_string(&stmt, buf);
+ db_set_string(&stmt, buf);
if (db_open_select_cursor(driver, &stmt, &cursor, DB_SEQUENTIAL) != DB_OK)
return (-1);
@@ -224,7 +224,7 @@
G_zero(val, sizeof(dbValue));
sprintf(buf, "SELECT %s FROM %s WHERE %s = %d\n", col, tab, key, id);
db_init_string(&stmt);
- db_append_string(&stmt, buf);
+ db_set_string(&stmt, buf);
if (db_open_select_cursor(driver, &stmt, &cursor, DB_SEQUENTIAL) != DB_OK)
return (-1);
More information about the grass-commit
mailing list