diff options
| author | Andrew Bell <andrew.bell.ia@gmail.com> | 2019-05-15 10:47:03 -0400 |
|---|---|---|
| committer | Andrew Bell <andrew.bell.ia@gmail.com> | 2019-05-15 10:47:03 -0400 |
| commit | 8f268409d37cea329d263e177b83e42f8384d3c7 (patch) | |
| tree | c4d0f3dd19456600f718a6e0c8573577f433549b /src/gridcatalog.cpp | |
| parent | 886ced02f0aaab5d66d16459435f7447cf976650 (diff) | |
| parent | d67203a6f76a74f5ac029ff052dbcc72e3b59624 (diff) | |
| download | PROJ-8f268409d37cea329d263e177b83e42f8384d3c7.tar.gz PROJ-8f268409d37cea329d263e177b83e42f8384d3c7.zip | |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'src/gridcatalog.cpp')
| -rw-r--r-- | src/gridcatalog.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gridcatalog.cpp b/src/gridcatalog.cpp index ca5750ab..15d81dd7 100644 --- a/src/gridcatalog.cpp +++ b/src/gridcatalog.cpp @@ -37,6 +37,13 @@ static PJ_GridCatalog *grid_catalog_list = nullptr; +static +PJ_GRIDINFO *pj_gc_findgrid( projCtx_t *ctx, + PJ_GridCatalog *catalog, int after, + PJ_LP location, double date, + PJ_Region *optional_region, + double *grid_date ); + /************************************************************************/ /* pj_gc_unloadall() */ /* */ @@ -236,6 +243,7 @@ int pj_gc_apply_gridshift( PJ *defn, int inverse, /* pj_c_findgrid() */ /************************************************************************/ +static PJ_GRIDINFO *pj_gc_findgrid( projCtx ctx, PJ_GridCatalog *catalog, int after, PJ_LP location, double date, PJ_Region *optional_region, @@ -287,6 +295,8 @@ PJ_GRIDINFO *pj_gc_findgrid( projCtx ctx, PJ_GridCatalog *catalog, int after, int grid_count = 0; gridlist = pj_gridlist_from_nadgrids( ctx, entry->definition, &grid_count); + // FIXME: this leaks gridlist itself, and memory ownership of + // entry->gridinfo is also confusing. Coverity CID 193539 if( grid_count == 1 ) entry->gridinfo = gridlist[0]; } |
