From: Itamar Oren Date: Mon, 27 Oct 2025 13:18:58 +0000 (-0700) Subject: gh-140641: Break out of inittab search on match (GH-140642) X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8b5cb8f33caeb779c6e2a59776ea62bd8c684d2;p=thirdparty%2FPython%2Fcpython.git gh-140641: Break out of inittab search on match (GH-140642) --- diff --git a/Python/import.c b/Python/import.c index d01c4d478283..45206b467938 100644 --- a/Python/import.c +++ b/Python/import.c @@ -2358,6 +2358,7 @@ create_builtin(PyThreadState *tstate, PyObject *name, PyObject *spec) for (struct _inittab *p = INITTAB; p->name != NULL; p++) { if (_PyUnicode_EqualToASCIIString(info.name, p->name)) { found = p; + break; } } if (found == NULL) {