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 common realloc mistake and add null check more #580

Merged
merged 1 commit into from
Sep 27, 2018

Conversation

charsyam
Copy link
Contributor

1] hiredis is client library, so need more null check and memory lick check.
because using null ptr can destroy application.

2] I refered https://www.mantidproject.org/How_to_fix_CppCheck_Errors for realloc issue.

@mnunberg
Copy link
Contributor

Any reason we can't merge this? Seems fine to me. Though, fighting against NULL returns from malloc is always an uphill battle..

@michael-grunder
Copy link
Collaborator

Looks OK to me. Like you say once you start getting NULL from malloc you probably have bigger problems, but it's certainly more correct.

@mnunberg mnunberg merged commit 747d78b into redis:master Sep 27, 2018
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.

3 participants