From f0afe77c52971e17e559ae4e7889bf353fccffb5 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Wed, 31 Aug 2016 08:44:11 -0700 Subject: Issue #27909: Fix INCREF for possible NULL value --- Python/import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/import.c b/Python/import.c index 5025e75..7018d59 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; } -- cgit v0.12