diff options
author | Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> | 2023-01-22 08:47:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-22 08:47:01 (GMT) |
commit | b53bad6dd08db78f5b5e2f41bea69c4b657fca13 (patch) | |
tree | 165d16ec14680f38e0a8631603190125351de2b0 /Modules | |
parent | 5f08fe4a2c055880c23c6f9b57ff03005d193bfc (diff) | |
download | cpython-b53bad6dd08db78f5b5e2f41bea69c4b657fca13.zip cpython-b53bad6dd08db78f5b5e2f41bea69c4b657fca13.tar.gz cpython-b53bad6dd08db78f5b5e2f41bea69c4b657fca13.tar.bz2 |
Revert "gh-100795: avoid unexpected `freeaddrinfo` after failed `getaddrinfo` (#101220)" (#101238)
Revert "gh-100795: avoid unexpected `freeaddrinfo` after failed `getaddrinfo` (#101220)"
This reverts commit 5f08fe4a2c055880c23c6f9b57ff03005d193bfc.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/socketmodule.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 8659d72..4747a23 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -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; } |