Skip to content
Permalink
Browse files
Fix memory leak
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14173 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Sep 1, 2010
1 parent 2801abe commit d8327576348f4554733a15640d8184d91f8e72fe
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/pal/feature.cpp
@@ -869,7 +869,10 @@ namespace pal
}

if ( total_distance == 0 )
{
delete[] path_distances;
return 0;
}

LinkedList<LabelPosition*> *positions = new LinkedList<LabelPosition*> ( ptrLPosCompare );
double delta = max( f->labelInfo->label_height, total_distance / 10.0 );
@@ -941,6 +944,7 @@ namespace pal
( *lPos )[i] = positions->pop_front();
}
delete positions;
delete[] path_distances;

return nbp;
}

0 comments on commit d832757

Please sign in to comment.