Skip to content

Commit badc1cd

Browse files
committed
GDALDataset::BuildOverviews(): fix memleak in error code path (master only)
1 parent c3975ff commit badc1cd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

gcore/gdaldataset.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2160,6 +2160,7 @@ CPLErr GDALDataset::BuildOverviews(const char *pszResampling, int nOverviews,
21602160
"panOverviewList[%d] = %d is invalid. It must be a "
21612161
"positive value",
21622162
i, panOverviewList[i]);
2163+
CPLFree(panAllBandList);
21632164
return CE_Failure;
21642165
}
21652166
}

0 commit comments

Comments
 (0)