mirror of
https://github.com/python/cpython.git
synced 2026-05-06 12:49:07 -04:00
[3.14] Fix unlikely potential reference leak in _locale._getdefaultlocale (GH-145250) (GH-145302)
It occurs in a code which perhaps never executed.
(cherry picked from commit 6ea84b2726)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
committed by
GitHub
parent
a58ea8c212
commit
86c846735b
@@ -579,7 +579,6 @@ _locale__getdefaultlocale_impl(PyObject *module)
|
||||
}
|
||||
|
||||
/* cannot determine the language code (very unlikely) */
|
||||
Py_INCREF(Py_None);
|
||||
return Py_BuildValue("Os", Py_None, encoding);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user