diff options
author | Brett Cannon <bcannon@gmail.com> | 2008-09-30 17:47:50 +0000 |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2008-09-30 17:47:50 +0000 |
commit | bab0f2ff662fa5e94115d2e902d3a694d61ad7f9 (patch) | |
tree | 0f64fe21a0522d2af7bd570197e8be3a336ecbec | |
parent | 833beab0e6e55aa0486d7c62acbeb7162da73bad (diff) | |
download | cpython-git-bab0f2ff662fa5e94115d2e902d3a694d61ad7f9.tar.gz |
Fix a refleak introduced by r66678 (backport of r66700).
-rw-r--r-- | Modules/_lsprof.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Modules/_lsprof.c b/Modules/_lsprof.c index 630b043a8d..3f2351229a 100644 --- a/Modules/_lsprof.c +++ b/Modules/_lsprof.c @@ -150,16 +150,7 @@ static PY_LONG_LONG CallExternalTimer(ProfilerObject *pObj) } Py_DECREF(o); if (PyErr_Occurred()) { - PyObject *context = (PyObject *)pObj; - /* 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); + PyErr_WriteUnraisable(pObj->externalTimer); return 0; } return result; |