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 a potential memory leak on row_cache insertion failure #11682

Closed
wants to merge 2 commits into from

Conversation

pdillinger
Copy link
Contributor

Summary: Although the built-in Cache implementations never return failure on Insert without keeping a reference (Handle), a custom implementation could. The code for inserting into row_cache does not keep a reference but does not clean up appropriately on non-OK. This is a fix.

Test Plan: unit test added that previously fails under ASAN

Summary: Although the built-in Cache implementations never return
failure on Insert without keeping a reference, a custom implementation
could. The code for inserting into row_cache does not keep a reference
but does not clean up appropriately on non-OK. This is a fix.

Test Plan: unit test added that previously fails under ASAN
@pdillinger pdillinger requested a review from ajkr August 7, 2023 23:00
@facebook-github-bot
Copy link
Contributor

@pdillinger has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Contributor

@ajkr ajkr left a comment

Choose a reason for hiding this comment

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

LGTM

@facebook-github-bot
Copy link
Contributor

@pdillinger merged this pull request in e214964.

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.

3 participants