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 | a915723dc780f2c6753487795988fe3b75e140a9 (patch) | |
tree | 2d626badf25b8eaed82cf9dcf99a76b03f2611de /Objects/floatobject.c | |
parent | b5a23223f0def31c5e509fb9329cc5520c4552e3 (diff) | |
download | cpython-a915723dc780f2c6753487795988fe3b75e140a9.zip cpython-a915723dc780f2c6753487795988fe3b75e140a9.tar.gz cpython-a915723dc780f2c6753487795988fe3b75e140a9.tar.bz2 |
fix potential refleak in PyFloat_AsDouble (closes #23590)
Diffstat (limited to 'Objects/floatobject.c')
-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 33e30ca..1dca947 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -220,6 +220,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; |