Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix ref leaks in signal module.
3 changes: 3 additions & 0 deletions Modules/signalmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1351,10 +1351,12 @@ PyInit__signal(void)
d = PyModule_GetDict(m);

x = DefaultHandler = PyLong_FromVoidPtr((void *)SIG_DFL);
Py_XINCREF(x);
if (PyModule_AddObject(m, "SIG_DFL", x))
goto finally;

x = IgnoreHandler = PyLong_FromVoidPtr((void *)SIG_IGN);
Py_XINCREF(x);
if (PyModule_AddObject(m, "SIG_IGN", x))
goto finally;

Expand Down Expand Up @@ -1568,6 +1570,7 @@ PyInit__signal(void)
#if defined (HAVE_SETITIMER) || defined (HAVE_GETITIMER)
ItimerError = PyErr_NewException("signal.ItimerError",
PyExc_OSError, NULL);
Py_XINCREF(ItimerError);
if (PyModule_AddObject(m, "ItimerError", ItimerError))
goto finally;
#endif
Expand Down