[GRASS-SVN] r46451 - grass/branches/develbranch_6/db/drivers/dbf
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 30 04:46:23 EDT 2011
Author: mmetz
Date: 2011-05-30 01:46:23 -0700 (Mon, 30 May 2011)
New Revision: 46451
Modified:
grass/branches/develbranch_6/db/drivers/dbf/dbfexe.c
Log:
fix memory leak (backport from trunk r46431)
Modified: grass/branches/develbranch_6/db/drivers/dbf/dbfexe.c
===================================================================
--- grass/branches/develbranch_6/db/drivers/dbf/dbfexe.c 2011-05-29 12:44:27 UTC (rev 46450)
+++ grass/branches/develbranch_6/db/drivers/dbf/dbfexe.c 2011-05-30 08:46:23 UTC (rev 46451)
@@ -49,7 +49,7 @@
ROW *dbrows;
VALUE *dbval;
int row, nrows;
- int *cols, ncols, col;
+ int *cols = NULL, ncols, col;
int *selset;
int dtype, stype;
int width, decimals;
@@ -311,6 +311,8 @@
}
if (st->command != SQLP_SELECT) { /* because statement is released with cursor */
sqpFreeStmt(st);
+ if (cols)
+ G_free(cols);
}
return DB_OK;
More information about the grass-commit
mailing list