Commit bab0f2ff authored by Brett Cannon's avatar Brett Cannon

Fix a refleak introduced by r66678 (backport of r66700).

parent 833beab0
...@@ -150,16 +150,7 @@ static PY_LONG_LONG CallExternalTimer(ProfilerObject *pObj) ...@@ -150,16 +150,7 @@ static PY_LONG_LONG CallExternalTimer(ProfilerObject *pObj)
} }
Py_DECREF(o); Py_DECREF(o);
if (PyErr_Occurred()) { if (PyErr_Occurred()) {
PyObject *context = (PyObject *)pObj; PyErr_WriteUnraisable(pObj->externalTimer);
/* May have been called by profiler_dealloc(). */
if (context->ob_refcnt < 1) {
context = PyString_FromString("profiler calling an "
"external timer");
if (context == NULL) {
return 0;
}
}
PyErr_WriteUnraisable(context);
return 0; return 0;
} }
return result; return result;
......
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