Permalink
Browse files

PostGIS: call msLayerTranslateFilter() in msPostGISLayerGetShapeCount…

…(), and fix memory leaks in msPostGISBuildSQLWhere()
  • Loading branch information...
rouault committed Feb 10, 2016
1 parent 2514786 commit 4557afed33f92d22c969282d22dacf027e5e7387
Showing with 4 additions and 0 deletions.
  1. +4 −0 mappostgis.c
@@ -2079,6 +2079,7 @@ char *msPostGISBuildSQLWhere(layerObj *layer, rectObj *rect, long *uid, rectObj
strTmp = msStringConcatenate(strTmp, ")");

msFree(strRect);
msFree(strRectOtherSRID);
strRect = strTmp;
strRectLength = strlen(strRect);
}
@@ -2117,6 +2118,7 @@ char *msPostGISBuildSQLWhere(layerObj *layer, rectObj *rect, long *uid, rectObj
strTmp = msStringConcatenate(strTmp, ")");

msFree(strRect);
msFree(strRectOtherSRID);
strRect = strTmp;
strRectLength = strlen(strRect);
}
@@ -2933,6 +2935,8 @@ int msPostGISLayerGetShapeCount(layerObj *layer, rectObj rect, projectionObj *re
}
#endif

msLayerTranslateFilter(layer, &layer->filter, layer->filteritem);

/* Fill out layerinfo with our current DATA state. */
if ( msPostGISParseData(layer) != MS_SUCCESS) {
return -1;

0 comments on commit 4557afe

Please sign in to comment.