Skip to content

Commit

Permalink
Fix leak in QgsCoordinateReferenceSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 7, 2017
1 parent 2555d28 commit aad7c5e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/qgscoordinatereferencesystem_p.h
Expand Up @@ -65,7 +65,7 @@ class QgsCoordinateReferenceSystemPrivate : public QSharedData
, mSRID( other.mSRID )
, mAuthId( other.mAuthId )
, mIsValid( other.mIsValid )
, mCRS( OSRNewSpatialReference( nullptr ) )
, mCRS( nullptr )
, mValidationHint( other.mValidationHint )
, mWkt( other.mWkt )
, mProj4( other.mProj4 )
Expand All @@ -76,6 +76,10 @@ class QgsCoordinateReferenceSystemPrivate : public QSharedData
{
mCRS = OSRClone( other.mCRS );
}
else
{
mCRS = OSRNewSpatialReference( nullptr );
}
}

~QgsCoordinateReferenceSystemPrivate()
Expand Down

0 comments on commit aad7c5e

Please sign in to comment.