Skip to content

v5: Fix memory leak in mca_coll_han_init_dynamic_rules: Coverity CID 1516452 #11222

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

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

jjhursey
Copy link
Member

Coverity static analysis reports a memory leak at the branch to file_reading_error in this function. The variable algorithm_name is allocated in the call to getnext_string at line 365 and is not freed anywhere other than a return in the case of a parse error, at line 379.

I added a free function call for algorithm_name at each of the function return points.

Signed-off-by: David Wootton [email protected]
(cherry picked from commit 36e68d5)

Coverity static analysis reports a memory leak at the branch to file_reading_error in this function. The variable algorithm_name is allocated in the call to getnext_string at line 365 and is not freed anywhere other than a return in the case of a parse error, at line 379.

I added a free function call for algorithm_name at each of the function return points.

Signed-off-by: David Wootton <[email protected]>
(cherry picked from commit 36e68d5)
@janjust janjust merged commit b186193 into open-mpi:v5.0.x Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants