Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[3.11] gh-100795: Don't call freeaddrinfo on failure. (GH-101252) #101272

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

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jan 23, 2023

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 [email protected]
Co-authored-by: Sergey G. Brester [email protected]
Co-authored-by: Oleg Iarygin [email protected]

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 <[email protected]>
Co-authored-by: Sergey G. Brester <[email protected]>
Co-authored-by: Oleg Iarygin <[email protected]>
@miss-islington miss-islington merged commit 5964b12 into python:3.11 Jan 23, 2023
@miss-islington miss-islington deleted the backport-b724ac2-3.11 branch January 23, 2023 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants