Permalink
Browse files

msPostGISLayerTranslateFilter: fix memory leak

  • Loading branch information...
rouault committed Sep 20, 2014
1 parent fcda97a commit 50ce97c3a805cd03248e809d808e8f685cc62c2e
Showing with 5 additions and 1 deletion.
  1. +5 −1 mappostgis.c
View
@@ -3690,15 +3690,19 @@ int msPostGISLayerTranslateFilter(layerObj *layer, expressionObj *filter, char *
break;
}
case MS_TOKEN_LITERAL_SHAPE:
{
char* wkt = msShapeToWKT(node->tokenval.shpval);
native_string = msStringConcatenate(native_string, "ST_GeomFromText('");
native_string = msStringConcatenate(native_string, msShapeToWKT(node->tokenval.shpval));
native_string = msStringConcatenate(native_string, wkt);
msFree(wkt);
native_string = msStringConcatenate(native_string, "'");
if(layerinfo->srid && strcmp(layerinfo->srid, "") != 0) {
native_string = msStringConcatenate(native_string, ",");
native_string = msStringConcatenate(native_string, layerinfo->srid);
}
native_string = msStringConcatenate(native_string, ")");
break;
}
/* data binding tokens */
case MS_TOKEN_BINDING_TIME:

0 comments on commit 50ce97c

Please sign in to comment.