Commit 282154ec authored by Denis Bilenko's avatar Denis Bilenko

fix a ref leak in callbacks.c

parent 7571e367
...@@ -116,6 +116,7 @@ static void gevent_callback(struct ev_loop *_loop, void *c_watcher, int revents) ...@@ -116,6 +116,7 @@ static void gevent_callback(struct ev_loop *_loop, void *c_watcher, int revents)
} }
} }
if (py_events) { if (py_events) {
Py_DECREF(py_events);
Py_INCREF(GEVENT_CORE_EVENTS); Py_INCREF(GEVENT_CORE_EVENTS);
PyTuple_SET_ITEM(watcher->args, 0, GEVENT_CORE_EVENTS); PyTuple_SET_ITEM(watcher->args, 0, GEVENT_CORE_EVENTS);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment