Skip to content

Commit

Permalink
Fix for memory leak in getFeatureInfo (bug #2990)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@14219 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Sep 11, 2010
1 parent 1cd2d14 commit 52e5891
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mapserver/qgswmsserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,13 +455,15 @@ int QgsWMSServer::getFeatureInfo( QDomDocument& result )

if ( configureMapRender( outputImage ) != 0 )
{
delete outputImage;
return 2;
}

//find out the current scale denominater and set it to the SLD parser
QgsScaleCalculator scaleCalc(( outputImage->logicalDpiX() + outputImage->logicalDpiY() ) / 2 , mMapRenderer->destinationSrs().mapUnits() );
QgsRectangle mapExtent = mMapRenderer->extent();
mConfigParser->setScaleDenominator( scaleCalc.calculate( mapExtent, outputImage->width() ) );
delete outputImage; //no longer needed for feature info

//read FEATURE_COUNT
int featureCount = 1;
Expand Down

0 comments on commit 52e5891

Please sign in to comment.