Skip to content

Commit

Permalink
Fix memory leak in filter multipoint
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 12, 2018
1 parent f7204fa commit 73f3164
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/core/geometry/qgsmultipoint.cpp
Expand Up @@ -189,10 +189,21 @@ void QgsMultiPoint::filterVertices( const std::function<bool ( const QgsPoint &
{
if ( const QgsPoint *point = qgsgeometry_cast< const QgsPoint * >( part ) )
{
return !filter( *point );
if ( !filter( *point ) )
{
delete point;
return true;
}
else
{
return false;
}
}
else
{
delete part;
return true;
}
} ), mGeometries.end() ); // clazy:exclude=detaching-member
}

Expand Down

0 comments on commit 73f3164

Please sign in to comment.