Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v.build.polylines: Fix Resource Leak issue in walk.c #4734

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ShubhamDesai
Copy link
Contributor

This pull request fixes issue identified by Coverity Scan (CID : 1207763)
Used Vect_destroy_cats_struct() to fix the issue.

@github-actions github-actions bot added vector Related to vector data processing C Related code is in C module labels Nov 22, 2024
@@ -166,6 +166,7 @@ int walk_forward_and_pick_up_coords(struct Map_info *map, int start_line,
next_node = n2; /* continue at end node */
}
else {
Vect_destroy_cats_struct(cats_tmp);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Vect_destroy_cats_struct(cats_tmp);
if (cats_tmp)
Vect_destroy_cats_struct(cats_tmp);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Related code is in C module vector Related to vector data processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants