Skip to content

Commit d07315c

Browse files
author
mhugent
committedSep 11, 2010
Fix for memory leak in getFeatureInfo (bug #2990)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14219 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/mapserver/qgswmsserver.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,13 +455,15 @@ int QgsWMSServer::getFeatureInfo( QDomDocument& result )
455455

456456
if ( configureMapRender( outputImage ) != 0 )
457457
{
458+
delete outputImage;
458459
return 2;
459460
}
460461

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

466468
//read FEATURE_COUNT
467469
int featureCount = 1;

0 commit comments

Comments
 (0)
Please sign in to comment.