Skip to content

Commit

Permalink
GDALDataset::BuildOverviews(): fix memleak in error code path (master…
Browse files Browse the repository at this point in the history
… only)
  • Loading branch information
rouault committed Jan 5, 2025
1 parent c3975ff commit badc1cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gcore/gdaldataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2160,6 +2160,7 @@ CPLErr GDALDataset::BuildOverviews(const char *pszResampling, int nOverviews,
"panOverviewList[%d] = %d is invalid. It must be a "
"positive value",
i, panOverviewList[i]);
CPLFree(panAllBandList);
return CE_Failure;
}
}
Expand Down

0 comments on commit badc1cd

Please sign in to comment.