Skip to content

Commit e2319fd

Browse files
committedJul 27, 2015
Fix alloc-dealloc-mismatch
1 parent 8c5b48c commit e2319fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎tests/src/core/testqgsfeature.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ void TestQgsFeature::geometry()
256256
copy = feature;
257257
QCOMPARE( *copy.constGeometry()->asWkb(), *mGeometry.data()->asWkb() );
258258
size_t wkbSize = mGeometry2->wkbSize();
259-
unsigned char* wkb = ( unsigned char* )malloc( wkbSize );
259+
unsigned char* wkb = new unsigned char[wkbSize];
260260
memcpy( wkb, mGeometry2->asWkb(), wkbSize );
261261
copy.setGeometryAndOwnership( wkb, wkbSize );
262262
QCOMPARE( *copy.constGeometry()->asWkb(), *mGeometry2->asWkb() );

0 commit comments

Comments
 (0)