Skip to content

Commit ed9a7e1

Browse files
author
jef
committed
fix memory leak
git-svn-id: http://svn.osgeo.org/qgis/trunk@14177 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent b33d801 commit ed9a7e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/qgsvectorfilewriter.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ QgsVectorFileWriter::QgsVectorFileWriter(
138138
{
139139
for ( int i = 0; i < datasourceOptions.size(); i++ )
140140
CPLFree( options[i] );
141+
delete [] options;
142+
options = NULL;
141143
}
142144

143145
if ( mDS == NULL )
@@ -194,6 +196,8 @@ QgsVectorFileWriter::QgsVectorFileWriter(
194196
{
195197
for ( int i = 0; i < layerOptions.size(); i++ )
196198
CPLFree( options[i] );
199+
delete [] options;
200+
options = NULL;
197201
}
198202

199203
if ( srs )

0 commit comments

Comments
 (0)