Skip to content

Commit

Permalink
missing CPLFree for GDALInfo() value
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsumner committed Jun 14, 2024
1 parent 8346468 commit 8d3f249
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inst/include/gdalapplib/gdalapplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ for (R_xlen_t i = 0; i < options.size(); ++i) {
if (hDataset == nullptr) {
out[i] = NA_STRING;
} else {
const char *outstr = GDALInfo(hDataset, psOptions);
char *outstr = GDALInfo(hDataset, psOptions);
out[i] = outstr;
CPLFree(outstr);
GDALClose(hDataset);
}
}
GDALInfoOptionsFree(psOptions);


return out;
}
Expand Down

0 comments on commit 8d3f249

Please sign in to comment.