Skip to content

lib/raster: Fix Resource Leak Issue in reclass.c #6146

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

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

Conversation

ShubhamDesai
Copy link
Contributor

@ShubhamDesai ShubhamDesai commented Jul 31, 2025

This pull request fixes issue identified by Coverity Scan (CID : 1208055, 1208056).
modified the function reclass_type() since it was allocating both static and dynamic memory and it was causing issue while freeing memory.
so now removed the dynamic memory allocation and updated the function.
The pull request refers issue discussed in #5398

@github-actions github-actions bot added raster Related to raster data processing C Related code is in C libraries labels Jul 31, 2025
@ShubhamDesai ShubhamDesai reopened this Jul 31, 2025
@ShubhamDesai
Copy link
Contributor Author

This pull request fixes issue identified by Coverity Scan (CID : 1208055, 1208056). modified the function reclass_type() since it was allocating both static and dynamic memory and it was causing issue while freeing memory. so now removed the dynamic memory allocation and updated the function. The pull request refers issue discussed in #5398

@nilason I tried updating the function.
I referred to your comment in #5398
Could you please check whether the updation is correct and if i understood and interpreted correctly.

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 raster Related to raster data processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant