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

Fix minor memory leaks #12031

Merged
merged 4 commits into from
Nov 12, 2023
Merged

Conversation

jsquyres
Copy link
Member

@jsquyres jsquyres commented Oct 30, 2023

Fix a few minor memory leaks found with clang's -fsanitize=address option. Refs #12019 (even though that issue is about v4.1.x).

See individual commit messages for details.

@jsquyres
Copy link
Member Author

@bosilca @bwbarrett I'm touching some fairly old code in this PR; can you guys review?

Remove an accidental second OBJ_CONSTRUCT of a local opal_bitmap_t
variable "reachable".

Signed-off-by: Jeff Squyres <[email protected]>
Even if a framework has its own framework_close function, we still
have to mca_base_component_unload() each component (which will be
handled safely/properly, regardless of whether the component is
statically linked or was opened dynamically) and then remove that
component from the framework's list of components.

Signed-off-by: Jeff Squyres <[email protected]>
When tearing down the BTL TCP component, use the handy
OPAL_LIST_DESTRUCT macro to OBJ_RELEASE all elements of the
mca_btl_tcp_component.local_ifs list and then OBJ_DESTRUCT -- not
OBJ_RELEASE -- the list itself.

Signed-off-by: Jeff Squyres <[email protected]>
split_and_resolve() destroys an argv as it analyzes it.  Fix one case
in the loop where argv[i] was accidentally neglected to be freed.

Signed-off-by: Jeff Squyres <[email protected]>
@jsquyres jsquyres force-pushed the pr/fix-minor-memory-leaks branch from 5cc0db9 to 1395303 Compare October 30, 2023 22:29
@jsquyres
Copy link
Member Author

@bosilca @bwbarrett Updated the PR. Can you re-review?

@jsquyres jsquyres requested a review from bosilca November 7, 2023 12:28
@bosilca bosilca merged commit 5af3a46 into open-mpi:main Nov 12, 2023
@jsquyres jsquyres deleted the pr/fix-minor-memory-leaks branch November 12, 2023 14:12
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.

2 participants