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 the reply in redisGetReply when passed NULL #741

Merged
merged 1 commit into from
Dec 18, 2019

Conversation

michael-grunder
Copy link
Collaborator

We currently perform a NULL check in redisGetReply and don't push the
reply back to the caller, but we don't free any reply meaning that this
will leak memory:

redisGetReply(context, NULL);

This change simply frees the reply if we were passed NULL.

Addresses #740

We currently perform a NULL check in redisGetReply and don't push the
reply back to the caller, but we don't free any reply meaning that this
will leak memory:

redisGetReply(context, NULL);

This change simply frees the reply if we were passed NULL.

Addresses #740
@michael-grunder
Copy link
Collaborator Author

This code hasn't been changed in almost ten years but it seems like we should free the reply especially since we're already doing a NULL check.

cc: @yossigo

@michael-grunder michael-grunder merged commit c96d492 into master Dec 18, 2019
@michael-grunder michael-grunder deleted the redisgetreply-null branch December 18, 2019 21:45
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.

1 participant