-
-
Notifications
You must be signed in to change notification settings - Fork 365
v.info: Fix Resource Leak Issues #5515
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
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Please address all similar issues in v.info (filter with |
Done. Addressed all issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a minor observation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I see what is wrong. Vect_get_proj_name(), only sometimes return an allocated string (in contradiction to its documentation). Sometimes it returns constants. If you skip the freeing of the result here, we're good to go.
(You're more than welcome to fix Vect_get_proj_name to always return an allocated string in another PR.
grass/lib/vector/Vlib/header.c
Line 536 in 7c426cb
const char *Vect_get_proj_name(struct Map_info *Map) |
)
I have removed it temporarily. I will create new PR to fix the function Vect_get_proj_name |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This pull request fixes issue identified by Coverity Scan (CID : 1415719)
Used G_free() to fix this issue.