diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 961657ec619..46a6aa9ec21 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1465,6 +1465,7 @@ make_flags(void) #undef SetFlag if (PyErr_Occurred()) { + Py_DECREF(seq); return NULL; } return seq;