fixed reference counting bug in rpc and signal handlers

This commit is contained in:
Unbit
2013-08-29 14:45:08 +02:00
parent f387d27582
commit f6545be647
+3
View File
@@ -394,6 +394,7 @@ PyObject *py_uwsgi_register_rpc(PyObject * self, PyObject * args) {
return NULL;
}
Py_INCREF(func);
if (uwsgi_register_rpc(name, &python_plugin, argc, func)) {
return PyErr_Format(PyExc_ValueError, "unable to register rpc function");
@@ -498,6 +499,8 @@ PyObject *py_uwsgi_register_signal(PyObject * self, PyObject * args) {
return NULL;
}
Py_INCREF(handler);
if (uwsgi_register_signal(uwsgi_signal, signal_kind, handler, 0)) {
return PyErr_Format(PyExc_ValueError, "unable to register signal");
}