Skip to content

Commit

Permalink
Fix leak in QgsCoordinateReferenceSystem
Browse files Browse the repository at this point in the history
(cherry-picked from aad7c5)
  • Loading branch information
nyalldawson committed Feb 12, 2017
1 parent 343bc8a commit 34e307b
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 34e307b

Please sign in to comment.