diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-03-06 14:08:44 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-03-06 14:08:44 (GMT) |
commit | f050648a505b3810b659ca490c2e418a02c702cc (patch) | |
tree | c517105ffc9b5bcfcadf13d626cf795d6b4b533e /Objects | |
parent | 8c51fedcdffcdca46eb7420325cf69c1da2d30be (diff) | |
download | cpython-f050648a505b3810b659ca490c2e418a02c702cc.zip cpython-f050648a505b3810b659ca490c2e418a02c702cc.tar.gz cpython-f050648a505b3810b659ca490c2e418a02c702cc.tar.bz2 |
fix potential refleak in PyFloat_AsDouble (closes #23590)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/floatobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 2bec0fb..0ce7f6c 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -271,6 +271,7 @@ PyFloat_AsDouble(PyObject *op) if (fo == NULL) return -1; if (!PyFloat_Check(fo)) { + Py_DECREF(fo); PyErr_SetString(PyExc_TypeError, "nb_float should return float object"); return -1; |