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

Do nothing when pointer is NULL in GeoIPRecord_delete #90

Merged
merged 1 commit into from Jul 18, 2017

Conversation

@johnlinp
Copy link
Contributor

commented Jul 18, 2017

It's okay to pass NULL to the free() function, so does GeoIP_delete(), GeoIPRegion_delete(), etc. However, GeoIPRecord_delete() doesn't accept NULL as the parameter.

This patch fixes it by checking the input pointer before dereferencing it.

@oschwald

This comment has been minimized.

Copy link
Member

commented Jul 18, 2017

Thanks!

@oschwald oschwald merged commit d8a8c22 into maxmind:master Jul 18, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.