commit | 7d037a7b5285093a4fa9906dc22d3dc1bf508b19 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Sun Mar 29 18:55:12 2009 +0000 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Sun Mar 29 18:55:12 2009 +0000 |
tree | 6ff062522cabf97d2b740cc1ce25f9141e434ef8 | |
parent | 8e21fb2c69687717f6980e545f54b293c3cf606d [diff] |
Plug another leak, and finally add a test for #1174606 (read() from /dev/zero). The leak was the reason my previous attempts at testing failed...
diff --git a/Modules/_fileio.c b/Modules/_fileio.c index c3124db..c0f5c90 100644 --- a/Modules/_fileio.c +++ b/Modules/_fileio.c
@@ -543,6 +543,7 @@ PyErr_SetString(PyExc_OverflowError, "unbounded read returned more bytes " "than a Python string can hold "); + Py_DECREF(result); return NULL; }