diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2019-03-27 07:35:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-27 07:35:32 +0100 |
| commit | cc0326748ba04cac6d9409543e6fad112bca36b6 (patch) | |
| tree | a422e160995a0ecb117e145d7b48e77e975a1d4c /src/gridcatalog.cpp | |
| parent | 4754220ec8e3febd3d96e8096df8291c7a78fdb1 (diff) | |
| parent | c05a91da2e9e008d77bd148d4de62045f9f149c8 (diff) | |
| download | PROJ-cc0326748ba04cac6d9409543e6fad112bca36b6.tar.gz PROJ-cc0326748ba04cac6d9409543e6fad112bca36b6.zip | |
Merge pull request #1373 from rouault/coverity_fixes
Coverity fixes
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]; } |
