[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:
Miss Islington (bot)
2026-02-27 09:31:11 +01:00
committed by GitHub
parent a58ea8c212
commit 86c846735b
-1
View File
@@ -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