Skip to content

Conversation

@mugitya03
Copy link
Contributor

The pointer verts at line 14 of function polygonStringToGeoPolygon is not freed before the function returns at line 34. Thus there is a memory leak bug.

LatLng *verts = calloc(numVerts, sizeof(LatLng));

            if (curDepth > 4) {
                // This is beyond the depth for a valid input, so we abort early
                return E_FAILED;
            }

The pointer `verts` at line 14 is not freed before the function returns at line 34. Thus there is a memory leak bug.

`LatLng *verts = calloc(numVerts, sizeof(LatLng));`

```
            if (curDepth > 4) {
                // This is beyond the depth for a valid input, so we abort early
                return E_FAILED;
            }
```
@CLAassistant
Copy link

CLAassistant commented Feb 26, 2025

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

Coverage Status

coverage: 98.784%. remained the same
when pulling 12f9d27 on mugitya03:master
into 3a02395 on uber:master.

@isaacbrodsky isaacbrodsky merged commit 2f689a3 into uber:master Feb 27, 2025
40 checks passed
ajfriend pushed a commit to ajfriend/h3 that referenced this pull request Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants