[GRASS-SVN] r46431 - grass/trunk/db/drivers/dbf
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 28 11:36:51 EDT 2011
Author: mmetz
Date: 2011-05-28 08:36:51 -0700 (Sat, 28 May 2011)
New Revision: 46431
Modified:
grass/trunk/db/drivers/dbf/dbfexe.c
Log:
fix (at least one) memory leak
Modified: grass/trunk/db/drivers/dbf/dbfexe.c
===================================================================
--- grass/trunk/db/drivers/dbf/dbfexe.c 2011-05-28 13:31:28 UTC (rev 46430)
+++ grass/trunk/db/drivers/dbf/dbfexe.c 2011-05-28 15:36:51 UTC (rev 46431)
@@ -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