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

rgw/rados: initialize variable 'rados[]' to zero #9289

Closed
wants to merge 1 commit into from

Conversation

Yan-waller
Copy link
Contributor

We should memset rados[] to zero before using it, since
it may be a unexpected pointer value while jumping to the fail: label
to do the delete rados[i] operation.

in addition, we should also release cr_registry.

Signed-off-by: Yan Jun yan.jun8@zte.com.cn

We should memset rados[] to zero before using it, since
it may be a unexpected pointer value while jumping to the *fail:* label
to do the 'delete rados[i]' operation.

in addition, we should also release cr_registry.

Signed-off-by: Yan Jun <yan.jun8@zte.com.cn>
@cbodley
Copy link
Contributor

cbodley commented May 24, 2016

this reminded me of an old branch that switched rados[] to a std::vector, which makes the error handling much simpler. i rebased that, added your fix for cr_registry, and opened #9295 - could you take a look?

@Yan-waller
Copy link
Contributor Author

retest this please

@mattbenjamin
Copy link
Contributor

@Yan-waller @cbodley I would also favor moving to std::vector here

@mattbenjamin
Copy link
Contributor

close because superceded by 9295

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