Skip to content

Commit d832757

Browse files
author
mhugent
committed
Fix memory leak
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14173 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 2801abe commit d832757

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/pal/feature.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,10 @@ namespace pal
869869
}
870870

871871
if ( total_distance == 0 )
872+
{
873+
delete[] path_distances;
872874
return 0;
875+
}
873876

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

945949
return nbp;
946950
}

0 commit comments

Comments
 (0)