Skip to content

Commit 4a4021b

Browse files
serhiy-storchakamiss-islington
authored andcommitted
Fix unlikely potential reference leak in _locale._getdefaultlocale (GH-145250)
It occurs in a code which perhaps never executed. (cherry picked from commit 6ea84b2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent cd3e9b3 commit 4a4021b

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

Modules/_localemodule.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,6 @@ _locale__getdefaultlocale_impl(PyObject *module)
568568
}
569569

570570
/* cannot determine the language code (very unlikely) */
571-
Py_INCREF(Py_None);
572571
return Py_BuildValue("Os", Py_None, encoding);
573572
}
574573
#endif

0 commit comments

Comments
 (0)