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

Free cluster_async_data in cases where hiredis don't takes ownership #234

Merged
merged 2 commits into from
Aug 17, 2024

Conversation

bjosv
Copy link
Collaborator

@bjosv bjosv commented Aug 15, 2024

When hiredis API redisAsyncFormattedCommand() fail to push a given callback to its internal queue we need to free the memory of cluster_async_data (which is used as privdata).
Before #225 this could happen when sending a command right after initiating a disconnect, but now its mainly in OOM cases.

Make sure we also keep the error message from redisAsyncFormattedCommand().

Fixes #229

bjosv added 2 commits August 15, 2024 16:28
When hiredis API `redisAsyncFormattedCommand()` fail to push a given callback to its
internal queue we need to free the cluster_async_data (used as privdata).
@bjosv bjosv requested a review from zuiderkwast August 15, 2024 14:52
hircluster.c Show resolved Hide resolved
@bjosv bjosv merged commit 7a80e7c into Nordix:master Aug 17, 2024
34 checks passed
@bjosv bjosv deleted the fix-leak branch August 17, 2024 10:12
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.

memory leak
2 participants