Skip to content
Permalink
Browse files

Fix memory leak in multiband color renderer

  • Loading branch information
mhugent committed Jul 16, 2013
1 parent 6b6742b commit 9093bcd51d21290c4d7e3c983d8be66e437c83d8
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/core/raster/qgsmultibandcolorrenderer.cpp
@@ -309,9 +309,11 @@ QgsRasterBlock* QgsMultiBandColorRenderer::block( int bandNo, QgsRectangle cons
}
}

for ( int i = 0; i < bandBlocks.size(); i++ )
//delete input blocks
QMap<int, QgsRasterBlock*>::const_iterator bandDelIt = bandBlocks.constBegin();
for ( ; bandDelIt != bandBlocks.constEnd(); ++bandDelIt )
{
delete bandBlocks.value( i );
delete bandDelIt.value();
}

return outputBlock;

0 comments on commit 9093bcd

Please sign in to comment.
You can’t perform that action at this time.