Skip to content

Conversation

drwootton
Copy link

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]

@drwootton drwootton requested a review from devreal December 13, 2022 15:09
@drwootton drwootton self-assigned this Dec 13, 2022
@jjhursey jjhursey changed the title Fix memory leak in mca_coll_han_init_dynamic_rules: Covid CID 1516452 Fix memory leak in mca_coll_han_init_dynamic_rules: Coverity CID 1516452 Dec 13, 2022
Coverity CID 1516452

Signed-off-by: David Wootton <[email protected]>
@janjust
Copy link
Contributor

janjust commented Dec 16, 2022

bot:retest

@jjhursey jjhursey merged commit 5d2a901 into open-mpi:main Dec 19, 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.

4 participants