Skip to content
Permalink
Browse files
Fix memory leak
git-svn-id: http://svn.osgeo.org/qgis/trunk@14173 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Sep 1, 2010
1 parent 94f418a commit b33d801
Showing 1 changed file with 4 additions and 0 deletions.
@@ -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 b33d801

Please sign in to comment.