Issue #23815: Fixed crashes related to directly created instances of types in

_tkinter and curses.panel modules.
This commit is contained in:
Serhiy Storchaka 2016-05-08 20:46:22 +03:00
parent 4c35964b76
commit e3f1b0911e
5 changed files with 16 additions and 3 deletions

View file

@ -3551,6 +3551,7 @@ PyInit__tkinter(void)
Py_DECREF(m);
return NULL;
}
((PyTypeObject *)o)->tp_new = NULL;
if (PyModule_AddObject(m, "TkappType", o)) {
Py_DECREF(o);
Py_DECREF(m);
@ -3563,6 +3564,7 @@ PyInit__tkinter(void)
Py_DECREF(m);
return NULL;
}
((PyTypeObject *)o)->tp_new = NULL;
if (PyModule_AddObject(m, "TkttType", o)) {
Py_DECREF(o);
Py_DECREF(m);
@ -3575,6 +3577,7 @@ PyInit__tkinter(void)
Py_DECREF(m);
return NULL;
}
((PyTypeObject *)o)->tp_new = NULL;
if (PyModule_AddObject(m, "Tcl_Obj", o)) {
Py_DECREF(o);
Py_DECREF(m);