mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Revert "gh-100795: avoid unexpected `freeaddrinfo` after failed `getaddrinfo` (#101220)"
This reverts commit 5f08fe4a2c
.
This commit is contained in:
parent
5f08fe4a2c
commit
b53bad6dd0
2 changed files with 0 additions and 4 deletions
|
@ -1,2 +0,0 @@
|
|||
Avoid unexpected ``freeaddrinfo`` when :meth:`socket.socket.getaddrinfo`
|
||||
fails. Patch by Sergey G. Brester.
|
|
@ -6719,7 +6719,6 @@ socket_getaddrinfo(PyObject *self, PyObject *args, PyObject* kwargs)
|
|||
error = getaddrinfo(hptr, pptr, &hints, &res0);
|
||||
Py_END_ALLOW_THREADS
|
||||
if (error) {
|
||||
res0 = NULL; /* avoid unexpected free if res0 becomes not NULL */
|
||||
set_gaierror(error);
|
||||
goto err;
|
||||
}
|
||||
|
@ -6816,7 +6815,6 @@ socket_getnameinfo(PyObject *self, PyObject *args)
|
|||
error = getaddrinfo(hostp, pbuf, &hints, &res);
|
||||
Py_END_ALLOW_THREADS
|
||||
if (error) {
|
||||
res = NULL; /* avoid unexpected free if res becomes not NULL */
|
||||
set_gaierror(error);
|
||||
goto fail;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue