mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-90716: Fix pylong_int_from_string() refleak (#99094)
Fix validated by: $ ./python -m test -R 3:3 test_int Tests result: SUCCESS
This commit is contained in:
parent
c0bf7607a1
commit
387f72588d
1 changed files with 1 additions and 0 deletions
|
@ -2376,6 +2376,7 @@ pylong_int_from_string(const char *start, const char *end, PyLongObject **res)
|
|||
goto error;
|
||||
}
|
||||
if (!PyLong_Check(result)) {
|
||||
Py_DECREF(result);
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"_pylong.int_from_string did not return an int");
|
||||
goto error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue