Skip to content
Permalink
Browse files

Fix memory leak in OGR provider when feature has no geometry

and FilterRect is used
  • Loading branch information
nyalldawson committed May 10, 2016
1 parent effb8dc commit 6b80518a5b55ab30fb19493266d5626d0f89d26b
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/providers/ogr/qgsogrfeatureiterator.cpp
@@ -238,13 +238,14 @@ bool QgsOgrFeatureIterator::fetchFeature( QgsFeature& feature )
{
if ( !readFeature( fet, feature ) )
continue;
else
OGR_F_Destroy( fet );

if ( !mRequest.filterRect().isNull() && !feature.constGeometry() )
continue;

// we have a feature, end this cycle
feature.setValid( true );
OGR_F_Destroy( fet );
return true;

} // while

0 comments on commit 6b80518

Please sign in to comment.
You can’t perform that action at this time.