-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-100795: Don't call freeaddrinfo on failure. #101252
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
gh-100795: Don't call freeaddrinfo on failure. #101252
Conversation
When getaddrinfo returns an error, the output pointer is in an unknown state Don't call freeaddrinfo on it. See the issue for discussion and details with links to reasoning. _Most_ libc getaddrinfo implementations never modify the output pointer unless they are returning success. Co-authored-by: Sergey G. Brester <github@sebres.de> Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
Sorry @gpshead, I had trouble checking out the |
Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
GH-101271 is a backport of this pull request to the 3.10 branch. |
GH-101272 is a backport of this pull request to the 3.11 branch. |
When getaddrinfo returns an error, the output pointer is in an unknown state Don't call freeaddrinfo on it. See the issue for discussion and details with links to reasoning. _Most_ libc getaddrinfo implementations never modify the output pointer unless they are returning success. (cherry picked from commit b724ac2) Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Sergey G. Brester <github@sebres.de> Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
When getaddrinfo returns an error, the output pointer is in an unknown state Don't call freeaddrinfo on it. See the issue for discussion and details with links to reasoning. _Most_ libc getaddrinfo implementations never modify the output pointer unless they are returning success. (cherry picked from commit b724ac2) Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Sergey G. Brester <github@sebres.de> Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
When getaddrinfo returns an error, the output pointer is in an unknown state Don't call freeaddrinfo on it. See the issue for discussion and details with links to reasoning. _Most_ libc getaddrinfo implementations never modify the output pointer unless they are returning success. (cherry picked from commit b724ac2) Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Sergey G. Brester <github@sebres.de> Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
When getaddrinfo returns an error, the output pointer is in an unknown state Don't call freeaddrinfo on it. See the issue for discussion and details with links to reasoning. _Most_ libc getaddrinfo implementations never modify the output pointer unless they are returning success. (cherry picked from commit b724ac2) Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Sergey G. Brester <github@sebres.de> Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
When getaddrinfo returns an error, the output pointer is in an unknown state Don't call freeaddrinfo on it. See the issue for discussion and details with links to reasoning. Most libc getaddrinfo implementations never modify the output pointer unless they are returning success.
Co-authored-by: Sergey G. Brester github@sebres.de
Co-authored-by: Oleg Iarygin oleg@arhadthedev.net
This re-does the earlier merged and reverted PR with some additional comments.