commit | f050648a505b3810b659ca490c2e418a02c702cc | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Fri Mar 06 09:08:44 2015 -0500 |
committer | Benjamin Peterson <benjamin@python.org> | Fri Mar 06 09:08:44 2015 -0500 |
tree | c517105ffc9b5bcfcadf13d626cf795d6b4b533e | |
parent | 8c51fedcdffcdca46eb7420325cf69c1da2d30be [diff] |
fix potential refleak in PyFloat_AsDouble (closes #23590)
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 @@ if (fo == NULL) return -1; if (!PyFloat_Check(fo)) { + Py_DECREF(fo); PyErr_SetString(PyExc_TypeError, "nb_float should return float object"); return -1;