From: Guido van Rossum Date: Sat, 13 Jan 2001 22:06:05 +0000 (+0000) Subject: Neil discovered a bad DECREF on warnoptions, that caused repeated X-Git-Tag: v2.1a1~302 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=03df3b3bc1073c43ae36777b8f5c3646b9cce61d;p=python Neil discovered a bad DECREF on warnoptions, that caused repeated re-initializing Python (Py_Finalize() followed by Py_Initialize()) to blow up quickly. With the DECREF removed I can't get it to fail any more. (Except it still leaks, but that's probably a separate issue.) --- diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 85fdc7e7f4..3df85ff022 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -634,8 +634,7 @@ _PySys_Init(void) Py_INCREF(warnoptions); } if (warnoptions != NULL) { - PyDict_SetItemString(sysdict, "warnoptions", v = warnoptions); - Py_DECREF(v); + PyDict_SetItemString(sysdict, "warnoptions", warnoptions); } if (PyErr_Occurred())