summaryrefslogtreecommitdiffstats
path: root/Modules/_lsprof.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-10-07 02:32:59 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-10-07 02:32:59 (GMT)
commit6ccc7038654513cc1f805be0dc1d5a2853babd07 (patch)
tree289c463ae86393d37d6f4ce084b1cb33e65958b6 /Modules/_lsprof.c
parentf259bc42c67564942cac317a8b7626b7ececd9e4 (diff)
downloadcpython-6ccc7038654513cc1f805be0dc1d5a2853babd07.zip
cpython-6ccc7038654513cc1f805be0dc1d5a2853babd07.tar.gz
cpython-6ccc7038654513cc1f805be0dc1d5a2853babd07.tar.bz2
Merged revisions 66677,66700 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r66677 | brett.cannon | 2008-09-28 22:41:21 -0500 (Sun, 28 Sep 2008) | 7 lines The _lsprof module could crash the interpreter if it was given an external timer that did not return a float and a timer was still running when the Profiler object was garbage collected. Fixes issue 3895. Code review by Benjamin Peterson. ........ r66700 | brett.cannon | 2008-09-30 12:46:03 -0500 (Tue, 30 Sep 2008) | 5 lines Fix a refleak introduced by r66677. Fix suggested by Amaury Forgeot d'Arc. Closes issue #4003. ........
Diffstat (limited to 'Modules/_lsprof.c')
-rw-r--r--Modules/_lsprof.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_lsprof.c b/Modules/_lsprof.c
index a6fd1f8..8457de1 100644
--- a/Modules/_lsprof.c
+++ b/Modules/_lsprof.c
@@ -150,7 +150,7 @@ static PY_LONG_LONG CallExternalTimer(ProfilerObject *pObj)
}
Py_DECREF(o);
if (PyErr_Occurred()) {
- PyErr_WriteUnraisable((PyObject *) pObj);
+ PyErr_WriteUnraisable(pObj->externalTimer);
return 0;
}
return result;