Skip to content

Commit 3315db0

Browse files
committed
Fix leak in QgsRelief
1 parent 540d692 commit 3315db0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/analysis/raster/qgsrelief.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,9 @@ gdal::dataset_unique_ptr QgsRelief::openOutputFile( GDALDatasetH inputDataset, G
452452

453453
//create three band raster (red, green, blue)
454454
gdal::dataset_unique_ptr outputDataset( GDALCreate( outputDriver, mOutputFile.toUtf8().constData(), xSize, ySize, 3, GDT_Byte, papszOptions ) );
455+
CSLDestroy( papszOptions );
456+
papszOptions = nullptr;
457+
455458
if ( !outputDataset )
456459
{
457460
return nullptr;

0 commit comments

Comments
 (0)