Skip to content

Fix memory leak if critnib_new fails #532

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

Closed
wants to merge 1 commit into from
Closed

Conversation

lplewa
Copy link
Contributor

@lplewa lplewa commented Jun 5, 2024

translate_params() allocates bitmaps which have to freed in case of error

translate_params() allocates bitmaps which have to freed.
@lplewa lplewa requested a review from a team as a code owner June 5, 2024 15:32
@lplewa lplewa force-pushed the memleak branch 2 times, most recently from 1a2d06e to 5833326 Compare June 5, 2024 15:50
ret = UMF_RESULT_ERROR_OUT_OF_HOST_MEMORY;
goto err_destroy_hwloc_topology;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

what will happen now, the other way around, if e.g. translate_params fail. Shouldn't we call critnib_delete...?

@lplewa lplewa closed this Jun 10, 2024
@lplewa
Copy link
Contributor Author

lplewa commented Jun 10, 2024

it will be fixed in #538

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants