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

lib/vector/Vlib: Fix Resource Leak issue in copy.c #4533

Merged
merged 12 commits into from
Oct 26, 2024

Conversation

ShubhamDesai
Copy link
Contributor

This pull request addresses resource leak issue identified by coverity scan (CID : 1208071)
Used existing function Vect_destroy_field_info() to fix the memory leak issue.

@github-actions github-actions bot added vector Related to vector data processing C Related code is in C libraries labels Oct 15, 2024
marisn
marisn previously approved these changes Oct 16, 2024
Copy link
Contributor

@nilason nilason left a comment

Choose a reason for hiding this comment

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

There are a number of similar resource leak issues 1 in that particular file, which are probably all trivial to fix. Please address them all in one (this) PR.

Footnotes

  1. CID 1208069, 1208070, 1208072, 1208073, 1208074, 1208075, 1208076, 1208077, 1208078, 1208079, 1208080, 1208081, 1270330, 1415802

@ShubhamDesai
Copy link
Contributor Author

ShubhamDesai commented Oct 22, 2024

There are a number of similar resource leak issues 1 in that particular file, which are probably all trivial to fix. Please address them all in one (this) PR.

Footnotes

  1. CID 1208069, 1208070, 1208072, 1208073, 1208074, 1208075, 1208076, 1208077, 1208078, 1208079, 1208080, 1208081, 1270330, 1415802

I have done the changes.
I think 1208070 doesn't exit any more its fixed.

I am not sure whether my understanding about the other fixes related to resource leak is correct. Please point out my mistakes .

lib/vector/Vlib/copy.c Outdated Show resolved Hide resolved
lib/vector/Vlib/copy.c Outdated Show resolved Hide resolved
lib/vector/Vlib/copy.c Outdated Show resolved Hide resolved
lib/vector/Vlib/copy.c Outdated Show resolved Hide resolved
lib/vector/Vlib/copy.c Outdated Show resolved Hide resolved
lib/vector/Vlib/copy.c Outdated Show resolved Hide resolved
lib/vector/Vlib/copy.c Outdated Show resolved Hide resolved
lib/vector/Vlib/copy.c Outdated Show resolved Hide resolved
lib/vector/Vlib/copy.c Outdated Show resolved Hide resolved
ShubhamDesai and others added 4 commits October 23, 2024 21:06
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@ShubhamDesai
Copy link
Contributor Author

@nilason i did the changes you suggested. Could you please review it. I am not sure whether i correctly interpreted your changes.

lib/vector/Vlib/copy.c Outdated Show resolved Hide resolved
Copy link
Contributor

@nilason nilason left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@nilason nilason merged commit 4616b9d into OSGeo:main Oct 26, 2024
26 checks passed
@github-actions github-actions bot added this to the 8.5.0 milestone Oct 26, 2024
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 libraries vector Related to vector data processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants