Skip to content

Commit 42ec4e6

Browse files
committed
Fix some leaks in geometry test suite
1 parent 91d2e4f commit 42ec4e6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tests/src/core/testqgsgeometry.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -2301,7 +2301,7 @@ void TestQgsGeometry::lineString()
23012301
QCOMPARE( static_cast< QgsPointV2*>( mpBoundary->geometryN( 1 ) )->x(), 1.0 );
23022302
QCOMPARE( static_cast< QgsPointV2*>( mpBoundary->geometryN( 1 ) )->y(), 1.0 );
23032303
QCOMPARE( static_cast< QgsPointV2*>( mpBoundary->geometryN( 1 ) )->z(), 20.0 );
2304-
2304+
delete boundary;
23052305

23062306
//extend
23072307
QgsLineString extend1;
@@ -3285,6 +3285,7 @@ void TestQgsGeometry::multiLineString()
32853285
QCOMPARE( static_cast< QgsPointV2*>( mpBoundary->geometryN( 3 ) )->x(), 20.0 );
32863286
QCOMPARE( static_cast< QgsPointV2*>( mpBoundary->geometryN( 3 ) )->y(), 20.0 );
32873287
QCOMPARE( static_cast< QgsPointV2*>( mpBoundary->geometryN( 3 ) )->z(), 200.0 );
3288+
delete boundary;
32883289
}
32893290

32903291
void TestQgsGeometry::multiPolygon()

tests/src/core/testqgsgeometryutils.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@ void TestQgsGeometryUtils::testVerticesAtDistance()
428428
QVERIFY( QgsGeometryUtils::verticesAtDistance( *outerRing1, 4, previous, next ) );
429429
QCOMPARE( previous, QgsVertexId( 0, 0, 4 ) );
430430
QCOMPARE( next, QgsVertexId( 0, 0, 4 ) );
431+
delete outerRing1;
431432

432433
// test closed line
433434
QgsLineString* closedRing1 = new QgsLineString();

0 commit comments

Comments
 (0)