Commit 8f734ebe authored by Christian Heimes's avatar Christian Heimes

Fixed reference leak in error branch of _bufferedreader_read_all(). The...

Fixed reference leak in error branch of _bufferedreader_read_all(). The variable data can contain a bytes object but it wasn't cleaned up when PyList_New() failed. CID 715364
parent fd302364
......@@ -1499,8 +1499,10 @@ _bufferedreader_read_all(buffered *self)
}
chunks = PyList_New(0);
if (chunks == NULL)
if (chunks == NULL) {
Py_XDECREF(data);
return NULL;
}
while (1) {
if (data) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment