Skip to content

Commit

Permalink
Fix vertex graph leaking on error
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacbrodsky committed Jan 16, 2022
1 parent c236195 commit 162f721
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/h3lib/lib/algos.c
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,7 @@ H3Error h3SetToVertexGraph(const H3Index *h3Set, const int numHexes,
for (int i = 0; i < numHexes; i++) {
H3Error boundaryErr = H3_EXPORT(cellToBoundary)(h3Set[i], &vertices);
if (boundaryErr) {
H3_EXPORT(destroyVertexGraph)(graph);
return boundaryErr;
}
// iterate through every edge
Expand Down

0 comments on commit 162f721

Please sign in to comment.