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 memleak in connect_to_ceph fail #107

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

Ten0
Copy link
Contributor

@Ten0 Ten0 commented Oct 19, 2024

It appears that the Rados struct not being constructed after rados_create succeeding but before other fallible calls may result in never calling the destructor that should be called after a successful call to rados_create, leading to a memory leak.

This fixes it, by moving the construction of the Rados struct just after the successful rados_create call.

Copy link
Collaborator

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thank you @Ten0 for this!

@Xuanwo Xuanwo merged commit ed61660 into ceph:master Oct 19, 2024
7 checks passed
@Ten0 Ten0 deleted the fix_connect_to_ceph_fail_memleak branch October 19, 2024 16:54
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.

2 participants