Issue #24268: Address some PEP 489 refleaks

- missing DECREF in PyModule_FromDefAndSpec2
- missing DECREF in PyType_FromSpecAndBases2
- missing DECREF in _testmultiphase module

Patch by Petr Viktorin
This commit is contained in:
Nick Coghlan 2015-05-24 01:03:46 +10:00
parent d5cacbb1d9
commit a48db2bc8b
3 changed files with 12 additions and 5 deletions

View file

@ -262,6 +262,7 @@ createfunc_nonmodule(PyObject *spec, PyModuleDef *def)
return NULL;
}
PyDict_SetItemString(dct, "three", three);
Py_DECREF(three);
ns = _PyNamespace_New(dct);
Py_DECREF(dct);