mirror of
https://github.com/python/cpython.git
synced 2025-11-13 07:26:31 +00:00
parent
7317c1ef7a
commit
5f95257ef9
2 changed files with 4 additions and 0 deletions
|
|
@ -22,6 +22,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #4373: Corrected a potential reference leak in the pickle module.
|
||||||
|
|
||||||
- Issue #4382: dbm.dumb did not specify the expected file encoding for opened
|
- Issue #4382: dbm.dumb did not specify the expected file encoding for opened
|
||||||
files.
|
files.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -486,11 +486,13 @@ unpickler_read(UnpicklerObject *self, char **s, Py_ssize_t n)
|
||||||
PyErr_SetString(PyExc_ValueError,
|
PyErr_SetString(PyExc_ValueError,
|
||||||
"read() from the underlying stream did not"
|
"read() from the underlying stream did not"
|
||||||
"return bytes");
|
"return bytes");
|
||||||
|
Py_DECREF(data);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PyBytes_GET_SIZE(data) != n) {
|
if (PyBytes_GET_SIZE(data) != n) {
|
||||||
PyErr_SetNone(PyExc_EOFError);
|
PyErr_SetNone(PyExc_EOFError);
|
||||||
|
Py_DECREF(data);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue