From: Raymond Hettinger Date: Wed, 31 Aug 2016 15:44:11 +0000 (-0700) Subject: Issue #27909: Fix INCREF for possible NULL value X-Git-Tag: v3.6.0b1~511^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f0afe77c52971e17e559ae4e7889bf353fccffb5;p=thirdparty%2FPython%2Fcpython.git Issue #27909: Fix INCREF for possible NULL value --- diff --git a/Python/import.c b/Python/import.c index 5025e755f4fb..7018d59e88b5 100644 --- a/Python/import.c +++ b/Python/import.c @@ -1056,7 +1056,7 @@ _imp_create_builtin(PyObject *module, PyObject *spec) mod = _PyImport_FindExtensionObject(name, name); if (mod || PyErr_Occurred()) { Py_DECREF(name); - Py_INCREF(mod); + Py_XINCREF(mod); return mod; }