commit | a9e14b70150d5bc064afd3144097ec0095869f10 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Tue Sep 16 07:11:46 2003 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Tue Sep 16 07:11:46 2003 +0000 |
tree | 2d10fb24fab34f7155b1286453391f03e26cbd06 | |
parent | 2d72b5d70723cb13eb0ad65b6deaf2a99094ac57 [diff] |
Fix leak in classobject.c. The leak surfaced on the error exit when hashing a class that does not define __hash__ but does define a comparison.
diff --git a/Objects/classobject.c b/Objects/classobject.c index 9375e07..0df249d 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c
@@ -953,6 +953,7 @@ return _Py_HashPointer(inst); } } + Py_XDECREF(func); PyErr_SetString(PyExc_TypeError, "unhashable instance"); return -1; }